home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / System 7 / Frontier / Frontier SDK 2.1.sit / Frontier SDK 2.1 / Extras / Droplet Developer / THINK C Source / droplet.c next >
MacBinary  |  1993-06-09  |  26.1 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Wed Jun 9 16:27:37 1993, modified Wed Jun 9 16:27:37 1993, creator Think C, type ASCII, 25984 bytes "droplet.c" , at 0x6600 602 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 64 72 6f 70 6c 65 | 74 2e 63 00 00 00 00 00 |..drople|t.c.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 65 80 00 | 00 02 5a a8 3b f8 39 a8 |.....e..|..Z.;.9.|
|00000060| 3b f8 39 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |;.9.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 be a4 00 00 |........|........|
|00000080| 20 0d 2f 2a a9 20 43 6f | 70 79 72 69 67 68 74 20 | ./*. Co|pyright |
|00000090| 31 39 39 32 20 55 73 65 | 72 4c 61 6e 64 20 53 6f |1992 Use|rLand So|
|000000a0| 66 74 77 61 72 65 2c 20 | 49 6e 63 2e 20 20 41 6c |ftware, |Inc. Al|
|000000b0| 6c 20 52 69 67 68 74 73 | 20 52 65 73 65 72 76 65 |l Rights| Reserve|
|000000c0| 64 2e 2a 2f 0d 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |d.*/...#|include |
|000000d0| 3c 41 70 70 6c 65 45 76 | 65 6e 74 73 2e 68 3e 0d |<AppleEv|ents.h>.|
|000000e0| 23 69 6e 63 6c 75 64 65 | 20 3c 41 6c 69 61 73 65 |#include| <Aliase|
|000000f0| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 47 |s.h>.#in|clude <G|
|00000100| 65 73 74 61 6c 74 45 71 | 75 2e 68 3e 0d 23 69 6e |estaltEq|u.h>.#in|
|00000110| 63 6c 75 64 65 20 3c 46 | 6f 6c 64 65 72 73 2e 68 |clude <F|olders.h|
|00000120| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 69 61 63 2e |>.#inclu|de <iac.|
|00000130| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 6d 65 6e |h>.#incl|ude <men|
|00000140| 75 73 68 61 72 69 6e 67 | 2e 68 3e 0d 0d 0d 0d 23 |usharing|.h>....#|
|00000150| 64 65 66 69 6e 65 20 6d | 6f 64 65 6c 65 73 73 69 |define m|odelessi|
|00000160| 64 20 31 33 30 0d 23 64 | 65 66 69 6e 65 20 72 75 |d 130.#d|efine ru|
|00000170| 6e 69 74 65 6d 20 31 0d | 23 64 65 66 69 6e 65 20 |nitem 1.|#define |
|00000180| 63 61 6e 63 65 6c 69 74 | 65 6d 20 32 0d 23 64 65 |cancelit|em 2.#de|
|00000190| 66 69 6e 65 20 6d 73 67 | 69 74 65 6d 20 33 0d 23 |fine msg|item 3.#|
|000001a0| 64 65 66 69 6e 65 20 65 | 64 69 74 69 74 65 6d 20 |define e|dititem |
|000001b0| 34 0d 23 64 65 66 69 6e | 65 20 69 63 6f 6e 69 74 |4.#defin|e iconit|
|000001c0| 65 6d 20 35 0d 23 64 65 | 66 69 6e 65 20 74 69 74 |em 5.#de|fine tit|
|000001d0| 6c 65 69 74 65 6d 20 36 | 0d 09 0d 44 69 61 6c 6f |leitem 6|...Dialo|
|000001e0| 67 50 74 72 20 77 3b 0d | 0d 23 64 65 66 69 6e 65 |gPtr w;.|.#define|
|000001f0| 20 61 70 70 6c 65 6d 65 | 6e 75 20 31 32 38 0d 23 | appleme|nu 128.#|
|00000200| 64 65 66 69 6e 65 20 61 | 62 6f 75 74 69 74 65 6d |define a|boutitem|
|00000210| 20 31 0d 0d 23 64 65 66 | 69 6e 65 20 66 69 6c 65 | 1..#def|ine file|
|00000220| 6d 65 6e 75 20 31 32 39 | 0d 23 64 65 66 69 6e 65 |menu 129|.#define|
|00000230| 20 71 75 69 74 69 74 65 | 6d 20 31 0d 0d 73 74 61 | quitite|m 1..sta|
|00000240| 74 69 63 20 4d 65 6e 75 | 48 61 6e 64 6c 65 20 68 |tic Menu|Handle h|
|00000250| 61 70 70 6c 65 6d 65 6e | 75 2c 20 68 66 69 6c 65 |applemen|u, hfile|
|00000260| 6d 65 6e 75 3b 0d 0d 42 | 6f 6f 6c 65 61 6e 20 66 |menu;..B|oolean f|
|00000270| 6c 65 78 69 74 6d 61 69 | 6e 6c 6f 6f 70 20 3d 20 |lexitmai|nloop = |
|00000280| 66 61 6c 73 65 3b 0d 0d | 0d 74 79 70 65 64 65 66 |false;..|.typedef|
|00000290| 20 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 20 62 | unsigne|d char b|
|000002a0| 79 74 65 3b 0d 0d 0d 73 | 74 61 74 69 63 20 53 74 |yte;...s|tatic St|
|000002b0| 72 32 35 35 20 61 70 70 | 70 61 74 68 3b 20 2f 2a |r255 app|path; /*|
|000002c0| 74 68 65 20 66 75 6c 6c | 20 70 61 74 68 20 74 6f |the full| path to|
|000002d0| 20 74 68 65 20 64 72 6f | 70 6c 65 74 20 61 70 70 | the dro|plet app|
|000002e0| 6c 69 63 61 74 69 6f 6e | 2a 2f 0d 0d 73 74 61 74 |lication|*/..stat|
|000002f0| 69 63 20 53 74 72 32 35 | 35 20 61 70 70 6e 61 6d |ic Str25|5 appnam|
|00000300| 65 3b 20 2f 2a 6a 75 73 | 74 20 74 68 65 20 6e 61 |e; /*jus|t the na|
|00000310| 6d 65 20 6f 66 20 74 68 | 65 20 66 69 6c 65 2c 20 |me of th|e file, |
|00000320| 6e 6f 20 70 61 74 68 2a | 2f 0d 0d 73 74 61 74 69 |no path*|/..stati|
|00000330| 63 20 42 6f 6f 6c 65 61 | 6e 20 66 6c 6f 70 65 6e |c Boolea|n flopen|
|00000340| 68 61 6e 64 6c 65 64 20 | 3d 20 66 61 6c 73 65 3b |handled |= false;|
|00000350| 20 2f 2a 77 68 65 6e 20 | 74 72 75 65 20 77 65 20 | /*when |true we |
|00000360| 66 61 6c 6c 20 74 68 72 | 75 20 74 68 65 20 6d 61 |fall thr|u the ma|
|00000370| 69 6e 20 65 76 65 6e 74 | 20 6c 6f 6f 70 2a 2f 0d |in event| loop*/.|
|00000380| 0d 73 74 61 74 69 63 20 | 41 45 44 65 73 63 20 66 |.static |AEDesc f|
|00000390| 69 6c 65 6c 69 73 74 3b | 20 2f 2a 68 6f 6c 64 73 |ilelist;| /*holds|
|000003a0| 20 74 68 65 20 6c 69 73 | 74 20 6f 66 20 66 69 6c | the lis|t of fil|
|000003b0| 65 73 20 74 6f 20 62 65 | 20 70 72 6f 63 65 73 73 |es to be| process|
|000003c0| 65 64 2a 2f 0d 0d 73 74 | 61 74 69 63 20 42 6f 6f |ed*/..st|atic Boo|
|000003d0| 6c 65 61 6e 20 66 6c 32 | 63 6c 69 63 6b 20 3d 20 |lean fl2|click = |
|000003e0| 74 72 75 65 3b 20 2f 2a | 74 72 75 65 20 69 66 20 |true; /*|true if |
|000003f0| 77 65 27 72 65 20 6c 61 | 75 6e 63 68 65 64 20 62 |we're la|unched b|
|00000400| 79 20 32 63 6c 69 63 6b | 69 6e 67 2a 2f 0d 09 0d |y 2click|ing*/...|
|00000410| 0d 0d 0d 73 74 61 74 69 | 63 20 48 61 6e 64 6c 65 |...stati|c Handle|
|00000420| 20 67 65 74 52 65 73 6f | 75 72 63 65 41 6e 64 44 | getReso|urceAndD|
|00000430| 65 74 61 63 68 20 28 4f | 53 54 79 70 65 20 72 65 |etach (O|SType re|
|00000440| 73 74 79 70 65 2c 20 73 | 68 6f 72 74 20 72 65 73 |stype, s|hort res|
|00000450| 69 64 29 20 7b 20 2f 2a | 6e 65 77 20 69 6e 20 46 |id) { /*|new in F|
|00000460| 72 6f 6e 74 69 65 72 20 | 53 44 4b 20 32 2e 31 2a |rontier |SDK 2.1*|
|00000470| 2f 0d 0d 09 48 61 6e 64 | 6c 65 20 68 3b 0d 09 0d |/...Hand|le h;...|
|00000480| 09 68 20 3d 20 47 65 74 | 52 65 73 6f 75 72 63 65 |.h = Get|Resource|
|00000490| 20 28 72 65 73 74 79 70 | 65 2c 20 72 65 73 69 64 | (restyp|e, resid|
|000004a0| 29 3b 0d 09 0d 09 69 66 | 20 28 68 20 21 3d 20 6e |);....if| (h != n|
|000004b0| 69 6c 29 0d 09 09 44 65 | 74 61 63 68 52 65 73 6f |il)...De|tachReso|
|000004c0| 75 72 63 65 20 28 68 29 | 3b 0d 09 09 0d 09 72 65 |urce (h)|;.....re|
|000004d0| 74 75 72 6e 20 28 68 29 | 3b 0d 09 7d 20 2f 2a 67 |turn (h)|;..} /*g|
|000004e0| 65 74 52 65 73 6f 75 72 | 63 65 41 6e 64 44 65 74 |etResour|ceAndDet|
|000004f0| 61 63 68 2a 2f 0d 09 0d | 09 0d 73 74 61 74 69 63 |ach*/...|..static|
|00000500| 20 76 6f 69 64 20 63 6f | 70 79 73 74 72 69 6e 67 | void co|pystring|
|00000510| 20 28 76 6f 69 64 20 2a | 73 6f 75 72 63 65 2c 20 | (void *|source, |
|00000520| 76 6f 69 64 20 2a 64 65 | 73 74 29 20 7b 0d 0d 09 |void *de|st) {...|
|00000530| 2f 2a 0d 09 63 72 65 61 | 74 65 20 61 20 63 6f 70 |/*..crea|te a cop|
|00000540| 79 20 6f 66 20 73 6f 75 | 72 63 65 20 69 6e 20 64 |y of sou|rce in d|
|00000550| 65 73 74 2e 20 20 63 6f | 70 79 20 74 68 65 20 6c |est. co|py the l|
|00000560| 65 6e 67 74 68 20 62 79 | 74 65 20 61 6e 64 0d 09 |ength by|te and..|
|00000570| 61 6c 6c 20 74 68 65 20 | 63 68 61 72 61 63 74 65 |all the |characte|
|00000580| 72 73 20 69 6e 20 74 68 | 65 20 73 6f 75 72 63 65 |rs in th|e source|
|00000590| 20 73 74 72 69 6e 67 2e | 0d 0d 09 61 73 73 75 6d | string.|...assum|
|000005a0| 65 20 74 68 65 20 73 74 | 72 69 6e 67 73 20 61 72 |e the st|rings ar|
|000005b0| 65 20 70 61 73 63 61 6c | 20 73 74 72 69 6e 67 73 |e pascal| strings|
|000005c0| 2c 20 77 69 74 68 20 74 | 68 65 20 6c 65 6e 67 74 |, with t|he lengt|
|000005d0| 68 20 62 79 74 65 20 69 | 6e 0d 09 74 68 65 20 66 |h byte i|n..the f|
|000005e0| 69 72 73 74 20 63 68 61 | 72 61 63 74 65 72 20 6f |irst cha|racter o|
|000005f0| 66 20 74 68 65 20 73 74 | 72 69 6e 67 2e 0d 09 2a |f the st|ring...*|
|00000600| 2f 0d 09 0d 09 72 65 67 | 69 73 74 65 72 20 73 68 |/....reg|ister sh|
|00000610| 6f 72 74 20 6e 3b 0d 09 | 72 65 67 69 73 74 65 72 |ort n;..|register|
|00000620| 20 62 79 74 65 20 2a 73 | 20 3d 20 73 6f 75 72 63 | byte *s| = sourc|
|00000630| 65 3b 0d 09 72 65 67 69 | 73 74 65 72 20 62 79 74 |e;..regi|ster byt|
|00000640| 65 20 2a 64 20 3d 20 64 | 65 73 74 3b 0d 09 0d 09 |e *d = d|est;....|
|00000650| 6e 20 3d 20 28 73 68 6f | 72 74 29 20 73 20 5b 30 |n = (sho|rt) s [0|
|00000660| 5d 3b 0d 09 0d 09 77 68 | 69 6c 65 20 28 6e 2d 2d |];....wh|ile (n--|
|00000670| 20 3e 3d 20 30 29 0d 09 | 09 2a 64 2b 2b 20 3d 20 | >= 0)..|.*d++ = |
|00000680| 2a 73 2b 2b 3b 0d 09 7d | 20 2f 2a 63 6f 70 79 73 |*s++;..}| /*copys|
|00000690| 74 72 69 6e 67 2a 2f 0d | 0d 0d 73 74 61 74 69 63 |tring*/.|..static|
|000006a0| 20 42 6f 6f 6c 65 61 6e | 20 70 75 73 68 73 74 72 | Boolean| pushstr|
|000006b0| 69 6e 67 20 28 53 74 72 | 32 35 35 20 62 73 73 6f |ing (Str|255 bsso|
|000006c0| 75 72 63 65 2c 20 53 74 | 72 32 35 35 20 62 73 64 |urce, St|r255 bsd|
|000006d0| 65 73 74 29 20 7b 0d 0d | 09 72 65 67 69 73 74 65 |est) {..|.registe|
|000006e0| 72 20 73 68 6f 72 74 20 | 6c 65 6e 73 6f 75 72 63 |r short |lensourc|
|000006f0| 65 20 3d 20 62 73 73 6f | 75 72 63 65 20 5b 30 5d |e = bsso|urce [0]|
|00000700| 3b 0d 09 72 65 67 69 73 | 74 65 72 20 73 68 6f 72 |;..regis|ter shor|
|00000710| 74 20 6c 65 6e 64 65 73 | 74 20 3d 20 62 73 64 65 |t lendes|t = bsde|
|00000720| 73 74 20 5b 30 5d 3b 0d | 09 72 65 67 69 73 74 65 |st [0];.|.registe|
|00000730| 72 20 62 79 74 65 20 2a | 70 73 6f 75 72 63 65 2c |r byte *|psource,|
|00000740| 20 2a 70 64 65 73 74 3b | 0d 09 0d 09 69 66 20 28 | *pdest;|....if (|
|00000750| 28 6c 65 6e 73 6f 75 72 | 63 65 20 2b 20 6c 65 6e |(lensour|ce + len|
|00000760| 64 65 73 74 29 20 3e 20 | 32 35 35 29 0d 09 09 72 |dest) > |255)...r|
|00000770| 65 74 75 72 6e 20 28 66 | 61 6c 73 65 29 3b 0d 09 |eturn (f|alse);..|
|00000780| 0d 09 70 64 65 73 74 20 | 3d 20 28 62 79 74 65 20 |..pdest |= (byte |
|00000790| 2a 29 20 62 73 64 65 73 | 74 20 2b 20 28 62 79 74 |*) bsdes|t + (byt|
|000007a0| 65 29 20 6c 65 6e 64 65 | 73 74 20 2b 20 31 3b 0d |e) lende|st + 1;.|
|000007b0| 09 0d 09 70 73 6f 75 72 | 63 65 20 3d 20 28 62 79 |...psour|ce = (by|
|000007c0| 74 65 20 2a 29 20 62 73 | 73 6f 75 72 63 65 20 2b |te *) bs|source +|
|000007d0| 20 31 3b 0d 09 0d 09 62 | 73 64 65 73 74 20 5b 30 | 1;....b|sdest [0|
|000007e0| 5d 20 2b 3d 20 28 62 79 | 74 65 29 20 6c 65 6e 73 |] += (by|te) lens|
|000007f0| 6f 75 72 63 65 3b 0d 09 | 0d 09 77 68 69 6c 65 20 |ource;..|..while |
|00000800| 28 2d 2d 6c 65 6e 73 6f | 75 72 63 65 20 3e 3d 20 |(--lenso|urce >= |
|00000810| 30 29 0d 09 09 2a 70 64 | 65 73 74 2b 2b 20 3d 20 |0)...*pd|est++ = |
|00000820| 2a 70 73 6f 75 72 63 65 | 2b 2b 3b 0d 09 0d 09 72 |*psource|++;....r|
|00000830| 65 74 75 72 6e 20 28 74 | 72 75 65 29 3b 0d 09 7d |eturn (t|rue);..}|
|00000840| 20 2f 2a 70 75 73 68 73 | 74 72 69 6e 67 2a 2f 0d | /*pushs|tring*/.|
|00000850| 09 0d 09 0d 73 74 61 74 | 69 63 20 42 6f 6f 6c 65 |....stat|ic Boole|
|00000860| 61 6e 20 70 75 73 68 6c | 6f 6e 67 20 28 6c 6f 6e |an pushl|ong (lon|
|00000870| 67 20 6e 75 6d 2c 20 53 | 74 72 32 35 35 20 62 73 |g num, S|tr255 bs|
|00000880| 64 65 73 74 29 20 7b 0d | 0d 09 53 74 72 32 35 35 |dest) {.|..Str255|
|00000890| 20 62 73 69 6e 74 3b 0d | 09 0d 09 4e 75 6d 54 6f | bsint;.|...NumTo|
|000008a0| 53 74 72 69 6e 67 20 28 | 6e 75 6d 2c 20 62 73 69 |String (|num, bsi|
|000008b0| 6e 74 29 3b 0d 09 0d 09 | 72 65 74 75 72 6e 20 28 |nt);....|return (|
|000008c0| 70 75 73 68 73 74 72 69 | 6e 67 20 28 62 73 69 6e |pushstri|ng (bsin|
|000008d0| 74 2c 20 62 73 64 65 73 | 74 29 29 3b 0d 09 7d 20 |t, bsdes|t));..} |
|000008e0| 2f 2a 70 75 73 68 6c 6f | 6e 67 2a 2f 0d 09 0d 0d |/*pushlo|ng*/....|
|000008f0| 73 74 61 74 69 63 20 76 | 6f 69 64 20 63 6c 65 61 |static v|oid clea|
|00000900| 72 62 79 74 65 73 20 28 | 76 6f 69 64 20 2a 70 63 |rbytes (|void *pc|
|00000910| 6c 65 61 72 2c 20 6c 6f | 6e 67 20 63 74 63 6c 65 |lear, lo|ng ctcle|
|00000920| 61 72 29 20 7b 0d 09 0d | 09 2f 2a 0d 09 64 6f 20 |ar) {...|./*..do |
|00000930| 61 20 6d 61 73 73 20 6d | 65 6d 6f 72 79 20 63 6c |a mass m|emory cl|
|00000940| 65 61 72 0d 09 2a 2f 0d | 09 0d 09 72 65 67 69 73 |ear..*/.|...regis|
|00000950| 74 65 72 20 62 79 74 65 | 20 2a 70 20 3d 20 70 63 |ter byte| *p = pc|
|00000960| 6c 65 61 72 3b 0d 09 72 | 65 67 69 73 74 65 72 20 |lear;..r|egister |
|00000970| 6c 6f 6e 67 20 63 74 20 | 3d 20 63 74 63 6c 65 61 |long ct |= ctclea|
|00000980| 72 3b 0d 09 0d 09 77 68 | 69 6c 65 20 28 2d 2d 63 |r;....wh|ile (--c|
|00000990| 74 20 3e 3d 20 30 29 0d | 09 09 2a 70 2b 2b 20 3d |t >= 0).|..*p++ =|
|000009a0| 20 28 62 79 74 65 29 20 | 30 3b 20 2f 2a 74 69 67 | (byte) |0; /*tig|
|000009b0| 68 74 20 6c 6f 6f 70 2a | 2f 0d 09 7d 20 2f 2a 63 |ht loop*|/..} /*c|
|000009c0| 6c 65 61 72 62 79 74 65 | 73 2a 2f 0d 0d 0d 73 74 |learbyte|s*/...st|
|000009d0| 61 74 69 63 20 42 6f 6f | 6c 65 61 6e 20 66 72 6f |atic Boo|lean fro|
|000009e0| 6e 74 6d 6f 73 74 61 70 | 70 20 28 29 20 7b 0d 09 |ntmostap|p () {..|
|000009f0| 0d 09 50 72 6f 63 65 73 | 73 53 65 72 69 61 6c 4e |..Proces|sSerialN|
|00000a00| 75 6d 62 65 72 20 63 75 | 72 72 65 6e 74 70 72 6f |umber cu|rrentpro|
|00000a10| 63 65 73 73 2c 20 66 72 | 6f 6e 74 70 72 6f 63 65 |cess, fr|ontproce|
|00000a20| 73 73 3b 0d 09 42 6f 6f | 6c 65 61 6e 20 66 6c 3b |ss;..Boo|lean fl;|
|00000a30| 0d 09 0d 09 47 65 74 43 | 75 72 72 65 6e 74 50 72 |....GetC|urrentPr|
|00000a40| 6f 63 65 73 73 20 28 26 | 63 75 72 72 65 6e 74 70 |ocess (&|currentp|
|00000a50| 72 6f 63 65 73 73 29 3b | 0d 09 0d 09 47 65 74 46 |rocess);|....GetF|
|00000a60| 72 6f 6e 74 50 72 6f 63 | 65 73 73 20 28 26 66 72 |rontProc|ess (&fr|
|00000a70| 6f 6e 74 70 72 6f 63 65 | 73 73 29 3b 0d 09 0d 09 |ontproce|ss);....|
|00000a80| 53 61 6d 65 50 72 6f 63 | 65 73 73 20 28 26 63 75 |SameProc|ess (&cu|
|00000a90| 72 72 65 6e 74 70 72 6f | 63 65 73 73 2c 20 26 66 |rrentpro|cess, &f|
|00000aa0| 72 6f 6e 74 70 72 6f 63 | 65 73 73 2c 20 26 66 6c |rontproc|ess, &fl|
|00000ab0| 29 3b 0d 09 0d 09 72 65 | 74 75 72 6e 20 28 66 6c |);....re|turn (fl|
|00000ac0| 29 3b 0d 09 7d 20 2f 2a | 66 72 6f 6e 74 6d 6f 73 |);..} /*|frontmos|
|00000ad0| 74 61 70 70 2a 2f 0d 09 | 0d 09 0d 73 74 61 74 69 |tapp*/..|...stati|
|00000ae0| 63 20 76 6f 69 64 20 63 | 6f 6d 65 74 6f 66 72 6f |c void c|ometofro|
|00000af0| 6e 74 20 28 76 6f 69 64 | 29 20 7b 0d 0d 09 69 66 |nt (void|) {...if|
|00000b00| 20 28 21 66 72 6f 6e 74 | 6d 6f 73 74 61 70 70 20 | (!front|mostapp |
|00000b10| 28 29 29 20 7b 0d 09 0d | 09 09 72 65 67 69 73 74 |()) {...|..regist|
|00000b20| 65 72 20 73 68 6f 72 74 | 20 69 3b 0d 09 09 50 72 |er short| i;...Pr|
|00000b30| 6f 63 65 73 73 53 65 72 | 69 61 6c 4e 75 6d 62 65 |ocessSer|ialNumbe|
|00000b40| 72 20 70 73 6e 3b 0d 09 | 09 45 76 65 6e 74 52 65 |r psn;..|.EventRe|
|00000b50| 63 6f 72 64 20 65 76 3b | 0d 09 09 0d 09 09 47 65 |cord ev;|......Ge|
|00000b60| 74 43 75 72 72 65 6e 74 | 50 72 6f 63 65 73 73 20 |tCurrent|Process |
|00000b70| 28 26 70 73 6e 29 3b 0d | 09 09 0d 09 09 53 65 74 |(&psn);.|.....Set|
|00000b80| 46 72 6f 6e 74 50 72 6f | 63 65 73 73 20 28 26 70 |FrontPro|cess (&p|
|00000b90| 73 6e 29 3b 0d 09 09 0d | 09 09 66 6f 72 20 28 69 |sn);....|..for (i|
|00000ba0| 20 3d 20 31 3b 20 69 20 | 3c 3d 20 33 3b 20 69 2b | = 1; i |<= 3; i+|
|00000bb0| 2b 29 0d 09 09 09 57 61 | 69 74 4e 65 78 74 45 76 |+)....Wa|itNextEv|
|00000bc0| 65 6e 74 20 28 6e 75 6c | 6c 45 76 65 6e 74 2c 20 |ent (nul|lEvent, |
|00000bd0| 26 65 76 2c 20 31 2c 20 | 6e 69 6c 29 3b 09 0d 09 |&ev, 1, |nil);...|
|00000be0| 09 7d 0d 09 7d 20 2f 2a | 63 6f 6d 65 74 6f 66 72 |.}..} /*|cometofr|
|00000bf0| 6f 6e 74 2a 2f 0d 09 0d | 09 0d 74 79 70 65 64 65 |ont*/...|..typede|
|00000c00| 66 20 73 74 72 75 63 74 | 20 76 65 72 73 69 6f 6e |f struct| version|
|00000c10| 52 65 63 6f 72 64 20 7b | 0d 0d 09 75 6e 73 69 67 |Record {|...unsig|
|00000c20| 6e 65 64 20 73 68 6f 72 | 74 20 6d 61 6a 6f 72 52 |ned shor|t majorR|
|00000c30| 65 76 3a 20 38 3b 20 0d | 09 0d 09 75 6e 73 69 67 |ev: 8; .|...unsig|
|00000c40| 6e 65 64 20 73 68 6f 72 | 74 20 6d 69 6e 6f 72 52 |ned shor|t minorR|
|00000c50| 65 76 3a 20 34 3b 09 0d | 09 0d 09 75 6e 73 69 67 |ev: 4;..|...unsig|
|00000c60| 6e 65 64 20 73 68 6f 72 | 74 20 62 75 67 46 69 78 |ned shor|t bugFix|
|00000c70| 52 65 76 3a 20 34 3b 20 | 0d 09 0d 09 75 6e 73 69 |Rev: 4; |....unsi|
|00000c80| 67 6e 65 64 20 73 68 6f | 72 74 20 72 65 73 65 72 |gned sho|rt reser|
|00000c90| 76 65 64 3a 20 31 35 3b | 0d 09 0d 09 75 6e 73 69 |ved: 15;|....unsi|
|00000ca0| 67 6e 65 64 20 73 68 6f | 72 74 20 66 6c 46 72 6f |gned sho|rt flFro|
|00000cb0| 6e 74 69 65 72 3a 20 31 | 3b 20 2f 2a 74 72 75 65 |ntier: 1|; /*true|
|00000cc0| 20 69 66 20 69 74 27 73 | 20 46 72 6f 6e 74 69 65 | if it's| Frontie|
|00000cd0| 72 2c 20 66 61 6c 73 65 | 20 69 66 20 69 74 27 73 |r, false| if it's|
|00000ce0| 20 52 75 6e 74 69 6d 65 | 2a 2f 0d 09 7d 20 76 65 | Runtime|*/..} ve|
|00000cf0| 72 73 69 6f 6e 52 65 63 | 6f 72 64 3b 0d 0d 0d 73 |rsionRec|ord;...s|
|00000d00| 74 61 74 69 63 20 42 6f | 6f 6c 65 61 6e 20 67 65 |tatic Bo|olean ge|
|00000d10| 74 46 72 6f 6e 74 69 65 | 72 56 65 72 73 69 6f 6e |tFrontie|rVersion|
|00000d20| 20 28 73 68 6f 72 74 20 | 2a 6d 61 6a 6f 72 52 65 | (short |*majorRe|
|00000d30| 76 2c 20 73 68 6f 72 74 | 20 2a 6d 69 6e 6f 72 52 |v, short| *minorR|
|00000d40| 65 76 2c 20 73 68 6f 72 | 74 20 2a 62 75 67 46 69 |ev, shor|t *bugFi|
|00000d50| 78 52 65 76 2c 20 42 6f | 6f 6c 65 61 6e 20 2a 66 |xRev, Bo|olean *f|
|00000d60| 6c 52 75 6e 74 69 6d 65 | 29 20 7b 0d 09 0d 09 2f |lRuntime|) {..../|
|00000d70| 2a 0d 09 69 66 20 46 72 | 6f 6e 74 69 65 72 20 69 |*..if Fr|ontier i|
|00000d80| 73 6e 27 74 20 72 75 6e | 6e 69 6e 67 2c 20 72 65 |sn't run|ning, re|
|00000d90| 74 75 72 6e 20 66 61 6c | 73 65 2e 0d 09 0d 09 69 |turn fal|se.....i|
|00000da0| 66 20 69 74 20 69 73 2c | 20 72 65 74 75 72 6e 20 |f it is,| return |
|00000db0| 74 72 75 65 20 77 69 74 | 68 20 69 6e 66 6f 72 6d |true wit|h inform|
|00000dc0| 61 74 69 6f 6e 20 61 62 | 6f 75 74 20 74 68 65 20 |ation ab|out the |
|00000dd0| 76 65 72 73 69 6f 6e 20 | 6f 66 20 46 72 6f 6e 74 |version |of Front|
|00000de0| 69 65 72 20 74 68 61 74 | 27 73 20 72 75 6e 6e 69 |ier that|'s runni|
|00000df0| 6e 67 2e 0d 09 0d 09 41 | 62 6f 75 74 20 74 68 65 |ng.....A|bout the|
|00000e00| 20 41 70 70 6c 65 20 45 | 76 65 6e 74 20 77 65 20 | Apple E|vent we |
|00000e10| 73 65 6e 64 2e 2e 2e 0d | 09 0d 09 57 65 20 63 61 |send....|...We ca|
|00000e20| 6c 6c 20 61 20 73 79 73 | 74 65 6d 20 65 76 65 6e |ll a sys|tem even|
|00000e30| 74 20 68 61 6e 64 6c 65 | 72 2c 20 73 6f 20 69 74 |t handle|r, so it|
|00000e40| 27 73 20 76 65 72 79 20 | 66 61 73 74 2e 20 0d 09 |'s very |fast. ..|
|00000e50| 0d 09 49 74 20 74 61 6b | 65 73 20 6e 6f 20 70 61 |..It tak|es no pa|
|00000e60| 72 61 6d 65 74 65 72 73 | 2c 20 61 6e 64 20 72 65 |rameters|, and re|
|00000e70| 74 75 72 6e 73 20 61 20 | 6c 6f 6e 67 20 76 61 6c |turns a |long val|
|00000e80| 75 65 2e 20 54 68 65 20 | 68 69 67 68 20 77 6f 72 |ue. The |high wor|
|00000e90| 64 20 6f 66 20 74 68 65 | 20 6c 6f 6e 67 20 69 73 |d of the| long is|
|00000ea0| 20 74 68 65 20 76 65 72 | 73 69 6f 6e 20 0d 09 6e | the ver|sion ..n|
|00000eb0| 75 6d 62 65 72 2c 20 70 | 61 63 6b 65 64 20 74 68 |umber, p|acked th|
|00000ec0| 65 20 73 61 6d 65 20 77 | 61 79 20 61 73 20 74 68 |e same w|ay as th|
|00000ed0| 65 20 73 79 73 74 65 6d | 20 76 65 72 73 69 6f 6e |e system| version|
|00000ee0| 20 69 73 20 70 61 63 6b | 65 64 20 69 6e 74 6f 20 | is pack|ed into |
|00000ef0| 74 68 65 20 53 79 73 45 | 6e 76 69 72 6f 6e 73 20 |the SysE|nvirons |
|00000f00| 72 65 63 6f 72 64 2e 20 | 0d 09 28 38 20 62 69 74 |record. |..(8 bit|
|00000f10| 73 20 6d 61 6a 6f 72 20 | 76 65 72 73 69 6f 6e 2c |s major |version,|
|00000f20| 20 34 20 62 69 74 73 20 | 6d 69 6e 6f 72 20 76 65 | 4 bits |minor ve|
|00000f30| 72 73 69 6f 6e 2c 20 34 | 20 62 69 74 73 20 72 65 |rsion, 4| bits re|
|00000f40| 76 69 73 69 6f 6e 2e 20 | 54 68 65 20 76 65 72 73 |vision. |The vers|
|00000f50| 69 6f 6e 20 32 2e 31 2e | 31 20 77 6f 75 6c 64 20 |ion 2.1.|1 would |
|00000f60| 0d 09 62 65 20 30 78 30 | 32 31 31 2e 29 20 54 68 |..be 0x0|211.) Th|
|00000f70| 65 20 6c 6f 77 20 77 6f | 72 64 20 63 6f 6e 74 61 |e low wo|rd conta|
|00000f80| 69 6e 73 20 61 74 74 72 | 69 62 75 74 65 73 20 6f |ins attr|ibutes o|
|00000f90| 66 20 74 68 65 20 73 65 | 72 76 65 72 20 70 72 6f |f the se|rver pro|
|00000fa0| 67 72 61 6d 2e 20 41 74 | 20 74 68 69 73 20 70 6f |gram. At| this po|
|00000fb0| 69 6e 74 20 6f 6e 6c 79 | 20 0d 09 61 20 73 69 6e |int only| ..a sin|
|00000fc0| 67 6c 65 20 62 69 74 20 | 69 73 20 64 65 66 69 6e |gle bit |is defin|
|00000fd0| 65 64 3a 20 74 68 65 20 | 6c 6f 77 20 6f 72 64 65 |ed: the |low orde|
|00000fe0| 72 20 62 69 74 20 69 73 | 20 73 65 74 20 69 66 20 |r bit is| set if |
|00000ff0| 46 72 6f 6e 74 69 65 72 | 20 69 73 20 74 68 65 20 |Frontier| is the |
|00001000| 73 65 72 76 65 72 3b 20 | 6f 74 68 65 72 77 69 73 |server; |otherwis|
|00001010| 65 2c 20 0d 09 52 75 6e | 74 69 6d 65 20 69 73 20 |e, ..Run|time is |
|00001020| 74 68 65 20 73 65 72 76 | 65 72 2e 0d 09 2a 2f 0d |the serv|er...*/.|
|00001030| 09 0d 09 41 70 70 6c 65 | 45 76 65 6e 74 20 65 76 |...Apple|Event ev|
|00001040| 65 6e 74 2c 20 72 65 70 | 6c 79 3b 0d 09 42 6f 6f |ent, rep|ly;..Boo|
|00001050| 6c 65 61 6e 20 66 6c 68 | 61 76 65 72 65 70 6c 79 |lean flh|avereply|
|00001060| 20 3d 20 66 61 6c 73 65 | 3b 0d 09 76 65 72 73 69 | = false|;..versi|
|00001070| 6f 6e 52 65 63 6f 72 64 | 20 78 3b 0d 09 0d 09 69 |onRecord| x;....i|
|00001080| 66 20 28 21 49 41 43 68 | 61 6e 64 6c 65 72 69 6e |f (!IACh|andlerin|
|00001090| 73 74 61 6c 6c 65 64 20 | 28 27 4c 41 4e 44 27 2c |stalled |('LAND',|
|000010a0| 20 27 77 68 6f 3f 27 2c | 20 74 72 75 65 29 29 20 | 'who?',| true)) |
|000010b0| 7b 20 2f 2a 69 74 27 73 | 20 46 72 6f 6e 74 69 65 |{ /*it's| Frontie|
|000010c0| 72 20 31 2e 30 2c 20 6e | 6f 74 20 52 75 6e 74 69 |r 1.0, n|ot Runti|
|000010d0| 6d 65 2a 2f 0d 09 09 0d | 09 09 2a 6d 61 6a 6f 72 |me*/....|..*major|
|000010e0| 52 65 76 20 3d 20 31 3b | 0d 09 09 0d 09 09 2a 6d |Rev = 1;|......*m|
|000010f0| 69 6e 6f 72 52 65 76 20 | 3d 20 30 3b 0d 09 09 0d |inorRev |= 0;....|
|00001100| 09 09 2a 62 75 67 46 69 | 78 52 65 76 20 3d 20 30 |..*bugFi|xRev = 0|
|00001110| 3b 0d 09 09 0d 09 09 2a | 66 6c 52 75 6e 74 69 6d |;......*|flRuntim|
|00001120| 65 20 3d 20 66 61 6c 73 | 65 3b 0d 09 09 0d 09 09 |e = fals|e;......|
|00001130| 72 65 74 75 72 6e 20 28 | 74 72 75 65 29 3b 0d 09 |return (|true);..|
|00001140| 09 7d 0d 0d 09 69 66 20 | 28 21 49 41 43 6e 65 77 |.}...if |(!IACnew|
|00001150| 73 79 73 74 65 6d 76 65 | 72 62 20 28 27 4c 41 4e |systemve|rb ('LAN|
|00001160| 44 27 2c 20 27 77 68 6f | 3f 27 2c 20 26 65 76 65 |D', 'who|?', &eve|
|00001170| 6e 74 29 29 0d 09 09 72 | 65 74 75 72 6e 20 28 66 |nt))...r|eturn (f|
|00001180| 61 6c 73 65 29 3b 0d 09 | 0d 09 69 66 20 28 21 49 |alse);..|..if (!I|
|00001190| 41 43 73 65 6e 64 76 65 | 72 62 20 28 26 65 76 65 |ACsendve|rb (&eve|
|000011a0| 6e 74 2c 20 26 72 65 70 | 6c 79 29 29 0d 09 09 67 |nt, &rep|ly))...g|
|000011b0| 6f 74 6f 20 65 72 72 6f | 72 3b 0d 09 0d 09 66 6c |oto erro|r;....fl|
|000011c0| 68 61 76 65 72 65 70 6c | 79 20 3d 20 74 72 75 65 |haverepl|y = true|
|000011d0| 3b 0d 09 0d 09 49 41 43 | 67 6c 6f 62 61 6c 73 2e |;....IAC|globals.|
|000011e0| 72 65 70 6c 79 20 3d 20 | 26 72 65 70 6c 79 3b 0d |reply = |&reply;.|
|000011f0| 09 0d 09 49 41 43 67 6c | 6f 62 61 6c 73 2e 65 76 |...IACgl|obals.ev|
|00001200| 65 6e 74 20 3d 20 26 72 | 65 70 6c 79 3b 20 2f 2a |ent = &r|eply; /*|
|00001210| 67 65 74 20 74 68 65 20 | 73 74 72 69 6e 67 20 66 |get the |string f|
|00001220| 72 6f 6d 20 74 68 65 20 | 72 65 70 6c 79 20 72 65 |rom the |reply re|
|00001230| 63 6f 72 64 2a 2f 0d 09 | 09 0d 09 69 66 20 28 21 |cord*/..|...if (!|
|00001240| 49 41 43 67 65 74 6c 6f | 6e 67 70 61 72 61 6d 20 |IACgetlo|ngparam |
|00001250| 28 27 2d 2d 2d 2d 27 2c | 20 28 6c 6f 6e 67 20 2a |('----',| (long *|
|00001260| 29 20 26 78 29 29 0d 09 | 09 67 6f 74 6f 20 65 72 |) &x))..|.goto er|
|00001270| 72 6f 72 3b 0d 09 0d 09 | 2a 6d 61 6a 6f 72 52 65 |ror;....|*majorRe|
|00001280| 76 20 3d 20 78 2e 6d 61 | 6a 6f 72 52 65 76 3b 0d |v = x.ma|jorRev;.|
|00001290| 09 0d 09 2a 6d 69 6e 6f | 72 52 65 76 20 3d 20 78 |...*mino|rRev = x|
|000012a0| 2e 6d 69 6e 6f 72 52 65 | 76 3b 0d 09 0d 09 2a 62 |.minorRe|v;....*b|
|000012b0| 75 67 46 69 78 52 65 76 | 20 3d 20 78 2e 62 75 67 |ugFixRev| = x.bug|
|000012c0| 46 69 78 52 65 76 3b 0d | 09 0d 09 2a 66 6c 52 75 |FixRev;.|...*flRu|
|000012d0| 6e 74 69 6d 65 20 3d 20 | 21 78 2e 66 6c 46 72 6f |ntime = |!x.flFro|
|000012e0| 6e 74 69 65 72 3b 0d 09 | 0d 09 41 45 44 69 73 70 |ntier;..|..AEDisp|
|000012f0| 6f 73 65 44 65 73 63 20 | 28 26 65 76 65 6e 74 29 |oseDesc |(&event)|
|00001300| 3b 09 0d 09 0d 09 41 45 | 44 69 73 70 6f 73 65 44 |;.....AE|DisposeD|
|00001310| 65 73 63 20 28 26 72 65 | 70 6c 79 29 3b 0d 09 0d |esc (&re|ply);...|
|00001320| 09 72 65 74 75 72 6e 20 | 28 74 72 75 65 29 3b 0d |.return |(true);.|
|00001330| 09 0d 09 65 72 72 6f 72 | 3a 0d 09 0d 09 41 45 44 |...error|:....AED|
|00001340| 69 73 70 6f 73 65 44 65 | 73 63 20 28 26 65 76 65 |isposeDe|sc (&eve|
|00001350| 6e 74 29 3b 09 0d 09 0d | 09 69 66 20 28 66 6c 68 |nt);....|.if (flh|
|00001360| 61 76 65 72 65 70 6c 79 | 29 0d 09 09 41 45 44 69 |avereply|)...AEDi|
|00001370| 73 70 6f 73 65 44 65 73 | 63 20 28 26 72 65 70 6c |sposeDes|c (&repl|
|00001380| 79 29 3b 0d 09 0d 09 72 | 65 74 75 72 6e 20 28 66 |y);....r|eturn (f|
|00001390| 61 6c 73 65 29 3b 0d 09 | 7d 20 2f 2a 67 65 74 46 |alse);..|} /*getF|
|000013a0| 72 6f 6e 74 69 65 72 56 | 65 72 73 69 6f 6e 2a 2f |rontierV|ersion*/|
|000013b0| 0d 0d 0d 73 74 61 74 69 | 63 20 76 6f 69 64 20 62 |...stati|c void b|
|000013c0| 6f 6c 64 65 6e 62 75 74 | 74 6f 6e 20 28 44 69 61 |oldenbut|ton (Dia|
|000013d0| 6c 6f 67 50 74 72 20 70 | 64 69 61 6c 6f 67 2c 20 |logPtr p|dialog, |
|000013e0| 73 68 6f 72 74 20 69 74 | 65 6d 6e 75 6d 62 65 72 |short it|emnumber|
|000013f0| 29 20 7b 0d 0d 09 73 68 | 6f 72 74 20 69 74 65 6d |) {...sh|ort item|
|00001400| 74 79 70 65 3b 0d 09 48 | 61 6e 64 6c 65 20 69 74 |type;..H|andle it|
|00001410| 65 6d 68 61 6e 64 6c 65 | 3b 0d 09 52 65 63 74 20 |emhandle|;..Rect |
|00001420| 69 74 65 6d 72 65 63 74 | 3b 0d 09 50 65 6e 53 74 |itemrect|;..PenSt|
|00001430| 61 74 65 20 73 61 76 65 | 64 70 65 6e 3b 0d 09 0d |ate save|dpen;...|
|00001440| 09 47 65 74 50 65 6e 53 | 74 61 74 65 20 28 26 73 |.GetPenS|tate (&s|
|00001450| 61 76 65 64 70 65 6e 29 | 3b 20 2f 2a 73 61 76 65 |avedpen)|; /*save|
|00001460| 20 74 68 65 20 6f 6c 64 | 20 70 65 6e 20 73 74 61 | the old| pen sta|
|00001470| 74 65 2a 2f 0d 09 0d 09 | 47 65 74 44 49 74 65 6d |te*/....|GetDItem|
|00001480| 20 28 70 64 69 61 6c 6f | 67 2c 20 69 74 65 6d 6e | (pdialo|g, itemn|
|00001490| 75 6d 62 65 72 2c 20 26 | 69 74 65 6d 74 79 70 65 |umber, &|itemtype|
|000014a0| 2c 20 26 69 74 65 6d 68 | 61 6e 64 6c 65 2c 20 26 |, &itemh|andle, &|
|000014b0| 69 74 65 6d 72 65 63 74 | 29 3b 20 2f 2a 67 65 74 |itemrect|); /*get|
|000014c0| 20 74 68 65 20 69 74 65 | 6d d5 73 20 72 65 63 74 | the ite|m.s rect|
|000014d0| 2a 2f 0d 09 0d 09 49 6e | 73 65 74 52 65 63 74 20 |*/....In|setRect |
|000014e0| 28 26 69 74 65 6d 72 65 | 63 74 2c 20 2d 34 2c 20 |(&itemre|ct, -4, |
|000014f0| 2d 34 29 3b 0d 09 0d 09 | 50 65 6e 53 69 7a 65 20 |-4);....|PenSize |
|00001500| 28 33 2c 20 33 29 3b 20 | 2f 2a 6d 61 6b 65 20 74 |(3, 3); |/*make t|
|00001510| 68 65 20 70 65 6e 20 66 | 61 74 74 65 72 2a 2f 0d |he pen f|atter*/.|
|00001520| 09 0d 09 46 72 61 6d 65 | 52 6f 75 6e 64 52 65 63 |...Frame|RoundRec|
|00001530| 74 20 28 26 69 74 65 6d | 72 65 63 74 2c 20 31 36 |t (&item|rect, 16|
|00001540| 2c 20 31 36 29 3b 20 2f | 2a 64 72 61 77 20 74 68 |, 16); /|*draw th|
|00001550| 65 20 72 69 6e 67 2a 2f | 0d 0d 09 53 65 74 50 65 |e ring*/|...SetPe|
|00001560| 6e 53 74 61 74 65 20 28 | 26 73 61 76 65 64 70 65 |nState (|&savedpe|
|00001570| 6e 29 3b 20 2f 2a 72 65 | 73 74 6f 72 65 20 74 68 |n); /*re|store th|
|00001580| 65 20 70 65 6e 20 73 74 | 61 74 65 2a 2f 0d 09 7d |e pen st|ate*/..}|
|00001590| 20 2f 2a 62 6f 6c 64 65 | 6e 62 75 74 74 6f 6e 2a | /*bolde|nbutton*|
|000015a0| 2f 0d 09 0d 09 0d 73 74 | 61 74 69 63 20 76 6f 69 |/.....st|atic voi|
|000015b0| 64 20 6e 6f 74 69 66 79 | 75 73 65 72 20 28 53 74 |d notify|user (St|
|000015c0| 72 32 35 35 20 73 29 20 | 7b 0d 09 0d 09 44 69 61 |r255 s) |{....Dia|
|000015d0| 6c 6f 67 50 74 72 20 70 | 64 69 61 6c 6f 67 3b 0d |logPtr p|dialog;.|
|000015e0| 09 73 68 6f 72 74 20 69 | 74 65 6d 6e 75 6d 62 65 |.short i|temnumbe|
|000015f0| 72 3b 0d 09 0d 09 63 6f | 6d 65 74 6f 66 72 6f 6e |r;....co|metofron|
|00001600| 74 20 28 29 3b 0d 09 0d | 09 50 61 72 61 6d 54 65 |t ();...|.ParamTe|
|00001610| 78 74 20 28 73 2c 20 22 | 5c 70 22 2c 20 22 5c 70 |xt (s, "|\p", "\p|
|00001620| 22 2c 20 22 5c 70 22 29 | 3b 20 0d 09 0d 09 70 64 |", "\p")|; ....pd|
|00001630| 69 61 6c 6f 67 20 3d 20 | 47 65 74 4e 65 77 44 69 |ialog = |GetNewDi|
|00001640| 61 6c 6f 67 20 28 31 32 | 39 2c 20 6e 69 6c 2c 20 |alog (12|9, nil, |
|00001650| 28 44 69 61 6c 6f 67 50 | 74 72 29 20 2d 31 4c 29 |(DialogP|tr) -1L)|
|00001660| 3b 0d 09 0d 09 53 68 6f | 77 57 69 6e 64 6f 77 20 |;....Sho|wWindow |
|00001670| 28 70 64 69 61 6c 6f 67 | 29 3b 09 0d 09 0d 09 53 |(pdialog|);.....S|
|00001680| 65 74 50 6f 72 74 20 28 | 70 64 69 61 6c 6f 67 29 |etPort (|pdialog)|
|00001690| 3b 0d 09 0d 09 62 6f 6c | 64 65 6e 62 75 74 74 6f |;....bol|denbutto|
|000016a0| 6e 20 28 70 64 69 61 6c | 6f 67 2c 20 31 29 3b 0d |n (pdial|og, 1);.|
|000016b0| 0d 09 53 79 73 42 65 65 | 70 20 28 31 29 3b 20 2f |..SysBee|p (1); /|
|000016c0| 2a 6d 75 6c 74 69 6d 65 | 64 69 61 21 2a 2f 0d 09 |*multime|dia!*/..|
|000016d0| 0d 09 4d 6f 64 61 6c 44 | 69 61 6c 6f 67 20 28 6e |..ModalD|ialog (n|
|000016e0| 69 6c 2c 20 26 69 74 65 | 6d 6e 75 6d 62 65 72 29 |il, &ite|mnumber)|
|000016f0| 3b 0d 0d 09 44 69 73 70 | 6f 73 44 69 61 6c 6f 67 |;...Disp|osDialog|
|00001700| 20 28 70 64 69 61 6c 6f | 67 29 3b 0d 09 7d 20 2f | (pdialo|g);..} /|
|00001710| 2a 6e 6f 74 69 66 79 75 | 73 65 72 2a 2f 0d 0d 0d |*notifyu|ser*/...|
|00001720| 73 74 61 74 69 63 20 42 | 6f 6f 6c 65 61 6e 20 49 |static B|oolean I|
|00001730| 41 43 73 74 72 69 6e 67 | 74 6f 74 65 78 74 20 28 |ACstring|totext (|
|00001740| 73 2c 20 68 74 65 78 74 | 29 20 53 74 72 32 35 35 |s, htext|) Str255|
|00001750| 20 73 3b 20 48 61 6e 64 | 6c 65 20 2a 68 74 65 78 | s; Hand|le *htex|
|00001760| 74 3b 20 7b 0d 09 0d 09 | 72 65 67 69 73 74 65 72 |t; {....|register|
|00001770| 20 6c 6f 6e 67 20 6c 65 | 6e 3b 0d 09 72 65 67 69 | long le|n;..regi|
|00001780| 73 74 65 72 20 48 61 6e | 64 6c 65 20 68 3b 0d 09 |ster Han|dle h;..|
|00001790| 0d 09 6c 65 6e 20 3d 20 | 73 20 5b 30 5d 3b 0d 09 |..len = |s [0];..|
|000017a0| 0d 09 68 20 3d 20 4e 65 | 77 48 61 6e 64 6c 65 20 |..h = Ne|wHandle |
|000017b0| 28 6c 65 6e 29 3b 0d 09 | 0d 09 69 66 20 28 68 20 |(len);..|..if (h |
|000017c0| 3d 3d 20 6e 69 6c 29 0d | 09 09 72 65 74 75 72 6e |== nil).|..return|
|000017d0| 20 28 66 61 6c 73 65 29 | 3b 0d 09 09 0d 09 42 6c | (false)|;.....Bl|
|000017e0| 6f 63 6b 4d 6f 76 65 20 | 28 26 73 20 5b 31 5d 2c |ockMove |(&s [1],|
|000017f0| 20 2a 68 2c 20 6c 65 6e | 29 3b 0d 09 0d 09 2a 68 | *h, len|);....*h|
|00001800| 74 65 78 74 20 3d 20 68 | 3b 0d 09 0d 09 72 65 74 |text = h|;....ret|
|00001810| 75 72 6e 20 28 74 72 75 | 65 29 3b 0d 09 7d 20 2f |urn (tru|e);..} /|
|00001820| 2a 49 41 43 73 74 72 69 | 6e 67 74 6f 74 65 78 74 |*IACstri|ngtotext|
|00001830| 2a 2f 0d 09 0d 09 0d 73 | 74 61 74 69 63 20 42 6f |*/.....s|tatic Bo|
|00001840| 6f 6c 65 61 6e 20 49 41 | 43 63 68 65 63 6b 65 72 |olean IA|Cchecker|
|00001850| 72 6f 72 20 28 53 74 72 | 32 35 35 20 65 72 72 6f |ror (Str|255 erro|
|00001860| 72 73 74 72 69 6e 67 29 | 20 7b 0d 09 0d 09 69 66 |rstring)| {....if|
|00001870| 20 28 49 41 43 69 73 65 | 72 72 6f 72 72 65 70 6c | (IACise|rrorrepl|
|00001880| 79 20 28 65 72 72 6f 72 | 73 74 72 69 6e 67 29 29 |y (error|string))|
|00001890| 20 7b 0d 09 09 0d 09 09 | 6e 6f 74 69 66 79 75 73 | {......|notifyus|
|000018a0| 65 72 20 28 65 72 72 6f | 72 73 74 72 69 6e 67 29 |er (erro|rstring)|
|000018b0| 3b 0d 09 09 0d 09 09 72 | 65 74 75 72 6e 20 28 74 |;......r|eturn (t|
|000018c0| 72 75 65 29 3b 0d 09 09 | 7d 0d 09 09 0d 09 72 65 |rue);...|}.....re|
|000018d0| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 7d |turn (fa|lse);..}|
|000018e0| 20 2f 2a 49 41 43 63 68 | 65 63 6b 65 72 72 6f 72 | /*IACch|eckerror|
|000018f0| 2a 2f 0d 09 0d 09 0d 73 | 74 61 74 69 63 20 42 6f |*/.....s|tatic Bo|
|00001900| 6f 6c 65 61 6e 20 69 73 | 66 6f 6c 64 65 72 20 28 |olean is|folder (|
|00001910| 53 74 72 32 35 35 20 66 | 75 6c 6c 70 61 74 68 29 |Str255 f|ullpath)|
|00001920| 20 7b 0d 09 0d 09 43 49 | 6e 66 6f 50 42 52 65 63 | {....CI|nfoPBRec|
|00001930| 20 70 62 3b 0d 09 4f 53 | 45 72 72 20 65 63 3b 0d | pb;..OS|Err ec;.|
|00001940| 09 0d 09 63 6c 65 61 72 | 62 79 74 65 73 20 28 26 |...clear|bytes (&|
|00001950| 70 62 2c 20 28 6c 6f 6e | 67 29 20 73 69 7a 65 6f |pb, (lon|g) sizeo|
|00001960| 66 20 28 70 62 29 29 3b | 20 2f 2a 69 6e 69 74 20 |f (pb));| /*init |
|00001970| 61 6c 6c 20 66 69 65 6c | 64 73 20 74 6f 20 7a 65 |all fiel|ds to ze|
|00001980| 72 6f 2a 2f 0d 09 0d 09 | 70 62 2e 68 46 69 6c 65 |ro*/....|pb.hFile|
|00001990| 49 6e 66 6f 2e 69 6f 4e | 61 6d 65 50 74 72 20 3d |Info.ioN|amePtr =|
|000019a0| 20 66 75 6c 6c 70 61 74 | 68 3b 0d 0d 09 70 62 2e | fullpat|h;...pb.|
|000019b0| 68 46 69 6c 65 49 6e 66 | 6f 2e 69 6f 56 52 65 66 |hFileInf|o.ioVRef|
|000019c0| 4e 75 6d 20 3d 20 30 3b | 0d 09 0d 09 65 63 20 3d |Num = 0;|....ec =|
|000019d0| 20 50 42 47 65 74 43 61 | 74 49 6e 66 6f 20 28 26 | PBGetCa|tInfo (&|
|000019e0| 70 62 2c 20 66 61 6c 73 | 65 29 3b 0d 09 0d 09 69 |pb, fals|e);....i|
|000019f0| 66 20 28 65 63 20 21 3d | 20 6e 6f 45 72 72 29 0d |f (ec !=| noErr).|
|00001a00| 09 09 72 65 74 75 72 6e | 20 28 66 61 6c 73 65 29 |..return| (false)|
|00001a10| 3b 0d 09 0d 09 72 65 74 | 75 72 6e 20 28 42 69 74 |;....ret|urn (Bit|
|00001a20| 54 73 74 20 28 26 70 62 | 2e 64 69 72 49 6e 66 6f |Tst (&pb|.dirInfo|
|00001a30| 2e 69 6f 46 6c 41 74 74 | 72 69 62 2c 20 33 29 29 |.ioFlAtt|rib, 3))|
|00001a40| 3b 0d 09 7d 20 2f 2a 69 | 73 66 6f 6c 64 65 72 2a |;..} /*i|sfolder*|
|00001a50| 2f 0d 0d 0d 73 74 61 74 | 69 63 20 42 6f 6f 6c 65 |/...stat|ic Boole|
|00001a60| 61 6e 20 64 69 72 65 63 | 74 6f 72 79 74 6f 70 61 |an direc|torytopa|
|00001a70| 74 68 20 28 6c 6f 6e 67 | 20 64 69 72 69 64 2c 20 |th (long| dirid, |
|00001a80| 73 68 6f 72 74 20 76 6e | 75 6d 2c 20 53 74 72 32 |short vn|um, Str2|
|00001a90| 35 35 20 70 61 74 68 29 | 20 7b 0d 09 0d 09 43 49 |55 path)| {....CI|
|00001aa0| 6e 66 6f 50 42 52 65 63 | 20 62 6c 6f 63 6b 3b 0d |nfoPBRec| block;.|
|00001ab0| 09 53 74 72 32 35 35 20 | 62 73 64 69 72 65 63 74 |.Str255 |bsdirect|
|00001ac0| 6f 72 79 3b 0d 09 4f 53 | 45 72 72 20 65 72 72 63 |ory;..OS|Err errc|
|00001ad0| 6f 64 65 3b 0d 09 0d 09 | 70 61 74 68 20 5b 30 5d |ode;....|path [0]|
|00001ae0| 20 3d 20 28 62 79 74 65 | 29 20 30 3b 20 2f 2a 30 | = (byte|) 0; /*0|
|00001af0| 2d 6c 65 6e 67 74 68 20 | 73 74 72 69 6e 67 2a 2f |-length |string*/|
|00001b00| 0d 09 0d 09 63 6c 65 61 | 72 62 79 74 65 73 20 28 |....clea|rbytes (|
|00001b10| 26 62 6c 6f 63 6b 2c 20 | 28 6c 6f 6e 67 29 20 73 |&block, |(long) s|
|00001b20| 69 7a 65 6f 66 20 28 62 | 6c 6f 63 6b 29 29 3b 0d |izeof (b|lock));.|
|00001b30| 09 0d 09 62 6c 6f 63 6b | 2e 64 69 72 49 6e 66 6f |...block|.dirInfo|
|00001b40| 2e 69 6f 4e 61 6d 65 50 | 74 72 20 3d 20 62 73 64 |.ioNameP|tr = bsd|
|00001b50| 69 72 65 63 74 6f 72 79 | 3b 0d 09 0d 09 62 6c 6f |irectory|;....blo|
|00001b60| 63 6b 2e 64 69 72 49 6e | 66 6f 2e 69 6f 44 72 50 |ck.dirIn|fo.ioDrP|
|00001b70| 61 72 49 44 20 3d 20 64 | 69 72 69 64 3b 0d 09 0d |arID = d|irid;...|
|00001b80| 09 64 6f 20 7b 0d 09 09 | 62 6c 6f 63 6b 2e 64 69 |.do {...|block.di|
|00001b90| 72 49 6e 66 6f 2e 69 6f | 56 52 65 66 4e 75 6d 20 |rInfo.io|VRefNum |
|00001ba0| 3d 20 76 6e 75 6d 3b 0d | 09 09 0d 09 09 62 6c 6f |= vnum;.|.....blo|
|00001bb0| 63 6b 2e 64 69 72 49 6e | 66 6f 2e 69 6f 46 44 69 |ck.dirIn|fo.ioFDi|
|00001bc0| 72 49 6e 64 65 78 20 3d | 20 2d 31 3b 0d 09 09 0d |rIndex =| -1;....|
|00001bd0| 09 09 62 6c 6f 63 6b 2e | 64 69 72 49 6e 66 6f 2e |..block.|dirInfo.|
|00001be0| 69 6f 44 72 44 69 72 49 | 44 20 3d 20 62 6c 6f 63 |ioDrDirI|D = bloc|
|00001bf0| 6b 2e 64 69 72 49 6e 66 | 6f 2e 69 6f 44 72 50 61 |k.dirInf|o.ioDrPa|
|00001c00| 72 49 44 3b 0d 09 09 0d | 09 09 65 72 72 63 6f 64 |rID;....|..errcod|
|00001c10| 65 20 3d 20 50 42 47 65 | 74 43 61 74 49 6e 66 6f |e = PBGe|tCatInfo|
|00001c20| 20 28 26 62 6c 6f 63 6b | 2c 66 61 6c 73 65 29 3b | (&block|,false);|
|00001c30| 0d 09 09 0d 09 09 69 66 | 20 28 65 72 72 63 6f 64 |......if| (errcod|
|00001c40| 65 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 09 09 72 |e != noE|rr)....r|
|00001c50| 65 74 75 72 6e 20 28 66 | 61 6c 73 65 29 3b 0d 09 |eturn (f|alse);..|
|00001c60| 09 09 0d 09 09 69 66 20 | 28 21 70 75 73 68 73 74 |.....if |(!pushst|
|00001c70| 72 69 6e 67 20 28 22 5c | 70 3a 22 2c 20 62 73 64 |ring ("\|p:", bsd|
|00001c80| 69 72 65 63 74 6f 72 79 | 29 29 0d 09 09 09 72 65 |irectory|))....re|
|00001c90| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 09 |turn (fa|lse);...|
|00001ca0| 0d 09 09 69 66 20 28 21 | 70 75 73 68 73 74 72 69 |...if (!|pushstri|
|00001cb0| 6e 67 20 28 70 61 74 68 | 2c 20 62 73 64 69 72 65 |ng (path|, bsdire|
|00001cc0| 63 74 6f 72 79 29 29 0d | 09 09 09 72 65 74 75 72 |ctory)).|...retur|
|00001cd0| 6e 20 28 66 61 6c 73 65 | 29 3b 0d 09 09 0d 09 09 |n (false|);......|
|00001ce0| 63 6f 70 79 73 74 72 69 | 6e 67 20 28 62 73 64 69 |copystri|ng (bsdi|
|00001cf0| 72 65 63 74 6f 72 79 2c | 20 70 61 74 68 29 3b 0d |rectory,| path);.|
|00001d00| 09 09 7d 20 77 68 69 6c | 65 20 28 62 6c 6f 63 6b |..} whil|e (block|
|00001d10| 2e 64 69 72 49 6e 66 6f | 2e 69 6f 44 72 44 69 72 |.dirInfo|.ioDrDir|
|00001d20| 49 44 20 21 3d 20 66 73 | 52 74 44 69 72 49 44 29 |ID != fs|RtDirID)|
|00001d30| 3b 0d 09 0d 09 72 65 74 | 75 72 6e 20 28 74 72 75 |;....ret|urn (tru|
|00001d40| 65 29 3b 0d 09 7d 20 2f | 2a 64 69 72 65 63 74 6f |e);..} /|*directo|
|00001d50| 72 79 74 6f 70 61 74 68 | 2a 2f 0d 0d 0d 73 74 61 |rytopath|*/...sta|
|00001d60| 74 69 63 20 42 6f 6f 6c | 65 61 6e 20 67 65 74 66 |tic Bool|ean getf|
|00001d70| 75 6c 6c 70 61 74 68 20 | 28 46 53 53 70 65 63 20 |ullpath |(FSSpec |
|00001d80| 2a 66 73 2c 20 53 74 72 | 32 35 35 20 66 75 6c 6c |*fs, Str|255 full|
|00001d90| 70 61 74 68 29 20 7b 0d | 0d 09 69 66 20 28 28 2a |path) {.|..if ((*|
|00001da0| 66 73 29 2e 70 61 72 49 | 44 20 3d 3d 20 31 29 20 |fs).parI|D == 1) |
|00001db0| 7b 20 2f 2a 69 74 27 73 | 20 61 20 76 6f 6c 75 6d |{ /*it's| a volum|
|00001dc0| 65 2a 2f 0d 09 09 0d 09 | 09 63 6f 70 79 73 74 72 |e*/.....|.copystr|
|00001dd0| 69 6e 67 20 28 28 2a 66 | 73 29 2e 6e 61 6d 65 2c |ing ((*f|s).name,|
|00001de0| 20 66 75 6c 6c 70 61 74 | 68 29 3b 0d 09 09 0d 09 | fullpat|h);.....|
|00001df0| 09 70 75 73 68 73 74 72 | 69 6e 67 20 28 22 5c 70 |.pushstr|ing ("\p|
|00001e00| 3a 22 2c 20 66 75 6c 6c | 70 61 74 68 29 3b 0d 09 |:", full|path);..|
|00001e10| 09 7d 0d 09 65 6c 73 65 | 20 7b 0d 09 09 69 66 20 |.}..else| {...if |
|00001e20| 28 21 64 69 72 65 63 74 | 6f 72 79 74 6f 70 61 74 |(!direct|orytopat|
|00001e30| 68 20 28 28 2a 66 73 29 | 2e 70 61 72 49 44 2c 20 |h ((*fs)|.parID, |
|00001e40| 28 2a 66 73 29 2e 76 52 | 65 66 4e 75 6d 2c 20 66 |(*fs).vR|efNum, f|
|00001e50| 75 6c 6c 70 61 74 68 29 | 29 20 0d 09 09 09 72 65 |ullpath)|) ....re|
|00001e60| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 09 |turn (fa|lse);...|
|00001e70| 0d 09 09 70 75 73 68 73 | 74 72 69 6e 67 20 28 28 |...pushs|tring ((|
|00001e80| 2a 66 73 29 2e 6e 61 6d | 65 2c 20 66 75 6c 6c 70 |*fs).nam|e, fullp|
|00001e90| 61 74 68 29 3b 0d 09 09 | 0d 09 09 69 66 20 28 69 |ath);...|...if (i|
|00001ea0| 73 66 6f 6c 64 65 72 20 | 28 66 75 6c 6c 70 61 74 |sfolder |(fullpat|
|00001eb0| 68 29 29 0d 09 09 09 70 | 75 73 68 73 74 72 69 6e |h))....p|ushstrin|
|00001ec0| 67 20 28 22 5c 70 3a 22 | 2c 20 66 75 6c 6c 70 61 |g ("\p:"|, fullpa|
|00001ed0| 74 68 29 3b 09 09 0d 09 | 09 7d 0d 09 09 0d 09 72 |th);....|.}.....r|
|00001ee0| 65 74 75 72 6e 20 28 74 | 72 75 65 29 3b 0d 09 7d |eturn (t|rue);..}|
|00001ef0| 20 2f 2a 67 65 74 66 75 | 6c 6c 70 61 74 68 2a 2f | /*getfu|llpath*/|
|00001f00| 0d 09 0d 0d 73 74 61 74 | 69 63 20 4f 53 54 79 70 |....stat|ic OSTyp|
|00001f10| 65 20 47 65 74 50 72 6f | 63 65 73 73 46 75 6c 6c |e GetPro|cessFull|
|00001f20| 50 61 74 68 20 28 76 6f | 69 64 29 20 7b 0d 09 0d |Path (vo|id) {...|
|00001f30| 09 50 72 6f 63 65 73 73 | 53 65 72 69 61 6c 4e 75 |.Process|SerialNu|
|00001f40| 6d 62 65 72 20 70 73 6e | 3b 0d 09 50 72 6f 63 65 |mber psn|;..Proce|
|00001f50| 73 73 49 6e 66 6f 52 65 | 63 20 69 6e 66 6f 3b 0d |ssInfoRe|c info;.|
|00001f60| 09 46 53 53 70 65 63 20 | 66 73 73 3b 0d 09 0d 09 |.FSSpec |fss;....|
|00001f70| 47 65 74 43 75 72 72 65 | 6e 74 50 72 6f 63 65 73 |GetCurre|ntProces|
|00001f80| 73 20 28 26 70 73 6e 29 | 3b 0d 09 0d 09 69 6e 66 |s (&psn)|;....inf|
|00001f90| 6f 2e 70 72 6f 63 65 73 | 73 49 6e 66 6f 4c 65 6e |o.proces|sInfoLen|
|00001fa0| 67 74 68 20 3d 20 28 6c | 6f 6e 67 29 20 73 69 7a |gth = (l|ong) siz|
|00001fb0| 65 6f 66 20 28 69 6e 66 | 6f 29 3b 0d 09 0d 09 69 |eof (inf|o);....i|
|00001fc0| 6e 66 6f 2e 70 72 6f 63 | 65 73 73 4e 61 6d 65 20 |nfo.proc|essName |
|00001fd0| 3d 20 61 70 70 6e 61 6d | 65 3b 20 2f 2a 70 6c 61 |= appnam|e; /*pla|
|00001fe0| 63 65 20 74 6f 20 73 74 | 6f 72 65 20 70 72 6f 63 |ce to st|ore proc|
|00001ff0| 65 73 73 20 6e 61 6d 65 | 2a 2f 0d 09 0d 09 69 6e |ess name|*/....in|
|00002000| 66 6f 2e 70 72 6f 63 65 | 73 73 41 70 70 53 70 65 |fo.proce|ssAppSpe|
|00002010| 63 20 3d 20 26 66 73 73 | 3b 20 2f 2a 70 6c 61 63 |c = &fss|; /*plac|
|00002020| 65 20 74 6f 20 73 74 6f | 72 65 20 70 72 6f 63 65 |e to sto|re proce|
|00002030| 73 73 20 66 69 6c 65 73 | 70 65 63 2a 2f 0d 09 0d |ss files|pec*/...|
|00002040| 09 47 65 74 50 72 6f 63 | 65 73 73 49 6e 66 6f 72 |.GetProc|essInfor|
|00002050| 6d 61 74 69 6f 6e 20 28 | 26 70 73 6e 2c 20 26 69 |mation (|&psn, &i|
|00002060| 6e 66 6f 29 3b 0d 09 0d | 09 72 65 74 75 72 6e 20 |nfo);...|.return |
|00002070| 28 67 65 74 66 75 6c 6c | 70 61 74 68 20 28 26 66 |(getfull|path (&f|
|00002080| 73 73 2c 20 61 70 70 70 | 61 74 68 29 29 3b 0d 09 |ss, appp|ath));..|
|00002090| 7d 20 2f 2a 47 65 74 50 | 72 6f 63 65 73 73 46 75 |} /*GetP|rocessFu|
|000020a0| 6c 6c 50 61 74 68 2a 2f | 0d 09 0d 09 0d 73 74 61 |llPath*/|.....sta|
|000020b0| 74 69 63 20 42 6f 6f 6c | 65 61 6e 20 70 72 6f 63 |tic Bool|ean proc|
|000020c0| 65 73 73 66 69 6c 65 20 | 28 53 74 72 32 35 35 20 |essfile |(Str255 |
|000020d0| 66 75 6c 6c 70 61 74 68 | 29 20 7b 0d 0d 09 42 6f |fullpath|) {...Bo|
|000020e0| 6f 6c 65 61 6e 20 66 6c | 68 61 76 65 72 65 70 6c |olean fl|haverepl|
|000020f0| 79 20 3d 20 66 61 6c 73 | 65 3b 0d 09 41 70 70 6c |y = fals|e;..Appl|
|00002100| 65 45 76 65 6e 74 20 65 | 76 65 6e 74 2c 20 72 65 |eEvent e|vent, re|
|00002110| 70 6c 79 3b 0d 09 53 74 | 72 32 35 35 20 62 73 65 |ply;..St|r255 bse|
|00002120| 72 72 6f 72 3b 0d 09 53 | 74 72 32 35 35 20 72 65 |rror;..S|tr255 re|
|00002130| 74 75 72 6e 65 64 73 74 | 72 69 6e 67 3b 20 0d 09 |turnedst|ring; ..|
|00002140| 0d 09 69 66 20 28 21 49 | 41 43 6e 65 77 76 65 72 |..if (!I|ACnewver|
|00002150| 62 20 28 27 4c 41 4e 44 | 27 2c 20 27 4f 48 49 4f |b ('LAND|', 'OHIO|
|00002160| 27 2c 20 27 70 72 6f 63 | 27 2c 20 26 65 76 65 6e |', 'proc|', &even|
|00002170| 74 29 29 0d 09 09 72 65 | 74 75 72 6e 20 28 66 61 |t))...re|turn (fa|
|00002180| 6c 73 65 29 3b 0d 09 0d | 09 49 41 43 67 6c 6f 62 |lse);...|.IACglob|
|00002190| 61 6c 73 2e 65 76 65 6e | 74 20 3d 20 26 65 76 65 |als.even|t = &eve|
|000021a0| 6e 74 3b 0d 09 0d 09 69 | 66 20 28 21 49 41 43 70 |nt;....i|f (!IACp|
|000021b0| 75 73 68 73 74 72 69 6e | 67 70 61 72 61 6d 20 28 |ushstrin|gparam (|
|000021c0| 66 75 6c 6c 70 61 74 68 | 2c 20 27 2d 2d 2d 2d 27 |fullpath|, '----'|
|000021d0| 29 29 0d 09 09 72 65 74 | 75 72 6e 20 28 66 61 6c |))...ret|urn (fal|
|000021e0| 73 65 29 3b 0d 09 09 0d | 09 69 66 20 28 21 49 41 |se);....|.if (!IA|
|000021f0| 43 73 65 6e 64 76 65 72 | 62 20 28 26 65 76 65 6e |Csendver|b (&even|
|00002200| 74 2c 20 26 72 65 70 6c | 79 29 29 0d 09 09 67 6f |t, &repl|y))...go|
|00002210| 74 6f 20 65 72 72 6f 72 | 3b 0d 09 0d 09 66 6c 68 |to error|;....flh|
|00002220| 61 76 65 72 65 70 6c 79 | 20 3d 20 74 72 75 65 3b |avereply| = true;|
|00002230| 0d 09 0d 09 49 41 43 67 | 6c 6f 62 61 6c 73 2e 72 |....IACg|lobals.r|
|00002240| 65 70 6c 79 20 3d 20 26 | 72 65 70 6c 79 3b 0d 09 |eply = &|reply;..|
|00002250| 0d 09 69 66 20 28 49 41 | 43 63 68 65 63 6b 65 72 |..if (IA|Cchecker|
|00002260| 72 6f 72 20 28 62 73 65 | 72 72 6f 72 29 29 20 0d |ror (bse|rror)) .|
|00002270| 09 09 67 6f 74 6f 20 65 | 72 72 6f 72 3b 0d 09 09 |..goto e|rror;...|
|00002280| 0d 09 49 41 43 67 6c 6f | 62 61 6c 73 2e 65 76 65 |..IACglo|bals.eve|
|00002290| 6e 74 20 3d 20 26 72 65 | 70 6c 79 3b 20 2f 2a 67 |nt = &re|ply; /*g|
|000022a0| 65 74 20 74 68 65 20 73 | 74 72 69 6e 67 20 66 72 |et the s|tring fr|
|000022b0| 6f 6d 20 74 68 65 20 72 | 65 70 6c 79 20 72 65 63 |om the r|eply rec|
|000022c0| 6f 72 64 2a 2f 0d 09 0d | 09 2f 2a 0d 09 69 66 20 |ord*/...|./*..if |
|000022d0| 28 21 49 41 43 67 65 74 | 73 74 72 69 6e 67 70 61 |(!IACget|stringpa|
|000022e0| 72 61 6d 20 28 27 2d 2d | 2d 2d 27 2c 20 72 65 74 |ram ('--|--', ret|
|000022f0| 75 72 6e 65 64 73 74 72 | 69 6e 67 29 29 20 2f 25 |urnedstr|ing)) /%|
|00002300| 6d 61 79 20 75 73 65 20 | 74 68 69 73 20 66 6f 72 |may use |this for|
|00002310| 20 73 6f 6d 65 74 68 69 | 6e 67 20 6d 6f 72 65 20 | somethi|ng more |
|00002320| 69 6e 74 65 72 65 73 74 | 69 6e 67 20 6c 61 74 65 |interest|ing late|
|00002330| 72 25 2f 0d 09 09 67 6f | 74 6f 20 65 72 72 6f 72 |r%/...go|to error|
|00002340| 3b 0d 09 2a 2f 0d 09 0d | 09 41 45 44 69 73 70 6f |;..*/...|.AEDispo|
|00002350| 73 65 44 65 73 63 20 28 | 26 65 76 65 6e 74 29 3b |seDesc (|&event);|
|00002360| 09 0d 09 0d 09 41 45 44 | 69 73 70 6f 73 65 44 65 |.....AED|isposeDe|
|00002370| 73 63 20 28 26 72 65 70 | 6c 79 29 3b 0d 09 0d 09 |sc (&rep|ly);....|
|00002380| 72 65 74 75 72 6e 20 28 | 74 72 75 65 29 3b 0d 09 |return (|true);..|
|00002390| 0d 09 65 72 72 6f 72 3a | 0d 09 0d 09 41 45 44 69 |..error:|....AEDi|
|000023a0| 73 70 6f 73 65 44 65 73 | 63 20 28 26 65 76 65 6e |sposeDes|c (&even|
|000023b0| 74 29 3b 09 0d 09 0d 09 | 69 66 20 28 66 6c 68 61 |t);.....|if (flha|
|000023c0| 76 65 72 65 70 6c 79 29 | 0d 09 09 41 45 44 69 73 |vereply)|...AEDis|
|000023d0| 70 6f 73 65 44 65 73 63 | 20 28 26 72 65 70 6c 79 |poseDesc| (&reply|
|000023e0| 29 3b 0d 09 0d 09 72 65 | 74 75 72 6e 20 28 66 61 |);....re|turn (fa|
|000023f0| 6c 73 65 29 3b 0d 09 7d | 20 2f 2a 70 72 6f 63 65 |lse);..}| /*proce|
|00002400| 73 73 66 69 6c 65 2a 2f | 0d 09 0d 09 0d 73 74 61 |ssfile*/|.....sta|
|00002410| 74 69 63 20 76 6f 69 64 | 20 64 6f 63 6c 6f 73 65 |tic void| doclose|
|00002420| 64 6f 77 6e 20 28 76 6f | 69 64 29 20 7b 0d 09 0d |down (vo|id) {...|
|00002430| 09 41 70 70 6c 65 45 76 | 65 6e 74 20 65 76 65 6e |.AppleEv|ent even|
|00002440| 74 2c 20 72 65 70 6c 79 | 3b 0d 09 0d 09 69 66 20 |t, reply|;....if |
|00002450| 28 49 41 43 6e 65 77 76 | 65 72 62 20 28 27 4c 41 |(IACnewv|erb ('LA|
|00002460| 4e 44 27 2c 20 27 4f 48 | 49 4f 27 2c 20 27 63 6c |ND', 'OH|IO', 'cl|
|00002470| 6f 73 27 2c 20 26 65 76 | 65 6e 74 29 29 09 0d 09 |os', &ev|ent))...|
|00002480| 09 49 41 43 73 65 6e 64 | 76 65 72 62 20 28 26 65 |.IACsend|verb (&e|
|00002490| 76 65 6e 74 2c 20 26 72 | 65 70 6c 79 29 3b 0d 09 |vent, &r|eply);..|
|000024a0| 7d 20 2f 2a 64 6f 63 6c | 6f 73 65 64 6f 77 6e 2a |} /*docl|osedown*|
|000024b0| 2f 0d 0d 0d 73 74 61 74 | 69 63 20 42 6f 6f 6c 65 |/...stat|ic Boole|
|000024c0| 61 6e 20 64 6f 69 6e 73 | 74 61 6c 6c 20 28 76 6f |an doins|tall (vo|
|000024d0| 69 64 29 20 7b 0d 0d 09 | 41 45 44 65 73 63 20 64 |id) {...|AEDesc d|
|000024e0| 65 73 63 3b 0d 09 4f 53 | 45 72 72 20 65 63 3b 0d |esc;..OS|Err ec;.|
|000024f0| 09 42 6f 6f 6c 65 61 6e | 20 66 6c 68 61 76 65 72 |.Boolean| flhaver|
|00002500| 65 70 6c 79 20 3d 20 66 | 61 6c 73 65 3b 0d 09 41 |eply = f|alse;..A|
|00002510| 70 70 6c 65 45 76 65 6e | 74 20 65 76 65 6e 74 2c |ppleEven|t event,|
|00002520| 20 72 65 70 6c 79 3b 0d | 09 53 74 72 32 35 35 20 | reply;.|.Str255 |
|00002530| 62 73 65 72 72 6f 72 3b | 0d 09 09 0d 09 69 66 20 |bserror;|.....if |
|00002540| 28 21 49 41 43 6e 65 77 | 76 65 72 62 20 28 27 4c |(!IACnew|verb ('L|
|00002550| 41 4e 44 27 2c 20 27 4f | 48 49 4f 27 2c 20 27 69 |AND', 'O|HIO', 'i|
|00002560| 6e 69 74 27 2c 20 26 65 | 76 65 6e 74 29 29 0d 09 |nit', &e|vent))..|
|00002570| 09 72 65 74 75 72 6e 20 | 28 66 61 6c 73 65 29 3b |.return |(false);|
|00002580| 0d 09 09 0d 09 49 41 43 | 67 6c 6f 62 61 6c 73 2e |.....IAC|globals.|
|00002590| 65 76 65 6e 74 20 3d 20 | 26 65 76 65 6e 74 3b 0d |event = |&event;.|
|000025a0| 09 0d 09 64 65 73 63 2e | 64 65 73 63 72 69 70 74 |...desc.|descript|
|000025b0| 6f 72 54 79 70 65 20 3d | 20 27 73 63 70 74 27 3b |orType =| 'scpt';|
|000025c0| 0d 09 0d 09 64 65 73 63 | 2e 64 61 74 61 48 61 6e |....desc|.dataHan|
|000025d0| 64 6c 65 20 3d 20 67 65 | 74 52 65 73 6f 75 72 63 |dle = ge|tResourc|
|000025e0| 65 41 6e 64 44 65 74 61 | 63 68 20 28 27 73 63 70 |eAndDeta|ch ('scp|
|000025f0| 74 27 2c 20 31 32 38 29 | 3b 0d 09 0d 09 65 63 20 |t', 128)|;....ec |
|00002600| 3d 20 41 45 50 75 74 50 | 61 72 61 6d 44 65 73 63 |= AEPutP|aramDesc|
|00002610| 20 28 26 65 76 65 6e 74 | 2c 20 28 41 45 4b 65 79 | (&event|, (AEKey|
|00002620| 77 6f 72 64 29 20 27 70 | 72 6d 31 27 2c 20 26 64 |word) 'p|rm1', &d|
|00002630| 65 73 63 29 3b 0d 09 0d | 09 41 45 44 69 73 70 6f |esc);...|.AEDispo|
|00002640| 73 65 44 65 73 63 20 28 | 26 64 65 73 63 29 3b 0d |seDesc (|&desc);.|
|00002650| 09 0d 09 69 66 20 28 65 | 63 20 21 3d 20 6e 6f 45 |...if (e|c != noE|
|00002660| 72 72 29 0d 09 09 72 65 | 74 75 72 6e 20 28 66 61 |rr)...re|turn (fa|
|00002670| 6c 73 65 29 3b 0d 09 0d | 09 64 65 73 63 2e 64 65 |lse);...|.desc.de|
|00002680| 73 63 72 69 70 74 6f 72 | 54 79 70 65 20 3d 20 27 |scriptor|Type = '|
|00002690| 6d 62 61 72 27 3b 0d 09 | 0d 09 64 65 73 63 2e 64 |mbar';..|..desc.d|
|000026a0| 61 74 61 48 61 6e 64 6c | 65 20 3d 20 67 65 74 52 |ataHandl|e = getR|
|000026b0| 65 73 6f 75 72 63 65 41 | 6e 64 44 65 74 61 63 68 |esourceA|ndDetach|
|000026c0| 20 28 27 6d 62 61 72 27 | 2c 20 31 32 38 29 3b 0d | ('mbar'|, 128);.|
|000026d0| 09 0d 09 65 63 20 3d 20 | 41 45 50 75 74 50 61 72 |...ec = |AEPutPar|
|000026e0| 61 6d 44 65 73 63 20 28 | 26 65 76 65 6e 74 2c 20 |amDesc (|&event, |
|000026f0| 28 41 45 4b 65 79 77 6f | 72 64 29 20 27 70 72 6d |(AEKeywo|rd) 'prm|
|00002700| 32 27 2c 20 26 64 65 73 | 63 29 3b 0d 09 0d 09 41 |2', &des|c);....A|
|00002710| 45 44 69 73 70 6f 73 65 | 44 65 73 63 20 28 26 64 |EDispose|Desc (&d|
|00002720| 65 73 63 29 3b 0d 09 0d | 09 69 66 20 28 65 63 20 |esc);...|.if (ec |
|00002730| 21 3d 20 6e 6f 45 72 72 | 29 0d 09 09 72 65 74 75 |!= noErr|)...retu|
|00002740| 72 6e 20 28 66 61 6c 73 | 65 29 3b 0d 09 0d 09 69 |rn (fals|e);....i|
|00002750| 66 20 28 21 49 41 43 70 | 75 73 68 73 74 72 69 6e |f (!IACp|ushstrin|
|00002760| 67 70 61 72 61 6d 20 28 | 61 70 70 70 61 74 68 2c |gparam (|apppath,|
|00002770| 20 27 70 72 6d 33 27 29 | 29 0d 09 09 72 65 74 75 | 'prm3')|)...retu|
|00002780| 72 6e 20 28 66 61 6c 73 | 65 29 3b 0d 09 09 0d 09 |rn (fals|e);.....|
|00002790| 69 66 20 28 21 49 41 43 | 73 65 6e 64 76 65 72 62 |if (!IAC|sendverb|
|000027a0| 20 28 26 65 76 65 6e 74 | 2c 20 26 72 65 70 6c 79 | (&event|, &reply|
|000027b0| 29 29 0d 09 09 67 6f 74 | 6f 20 65 72 72 6f 72 3b |))...got|o error;|
|000027c0| 0d 09 0d 09 66 6c 68 61 | 76 65 72 65 70 6c 79 20 |....flha|vereply |
|000027d0| 3d 20 74 72 75 65 3b 0d | 09 0d 09 49 41 43 67 6c |= true;.|...IACgl|
|000027e0| 6f 62 61 6c 73 2e 72 65 | 70 6c 79 20 3d 20 26 72 |obals.re|ply = &r|
|000027f0| 65 70 6c 79 3b 0d 09 0d | 09 69 66 20 28 49 41 43 |eply;...|.if (IAC|
|00002800| 63 68 65 63 6b 65 72 72 | 6f 72 20 28 62 73 65 72 |checkerr|or (bser|
|00002810| 72 6f 72 29 29 20 2f 2a | 73 79 6e 74 61 78 20 65 |ror)) /*|syntax e|
|00002820| 72 72 6f 72 20 6f 72 20 | 72 75 6e 74 69 6d 65 20 |rror or |runtime |
|00002830| 65 72 72 6f 72 2a 2f 0d | 09 09 67 6f 74 6f 20 65 |error*/.|..goto e|
|00002840| 72 72 6f 72 3b 0d 09 09 | 0d 09 49 41 43 67 6c 6f |rror;...|..IACglo|
|00002850| 62 61 6c 73 2e 65 76 65 | 6e 74 20 3d 20 26 72 65 |bals.eve|nt = &re|
|00002860| 70 6c 79 3b 20 2f 2a 67 | 65 74 20 74 68 65 20 73 |ply; /*g|et the s|
|00002870| 74 72 69 6e 67 20 66 72 | 6f 6d 20 74 68 65 20 72 |tring fr|om the r|
|00002880| 65 70 6c 79 20 72 65 63 | 6f 72 64 2a 2f 0d 09 09 |eply rec|ord*/...|
|00002890| 0d 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 20 |..AEDisp|oseDesc |
|000028a0| 28 26 65 76 65 6e 74 29 | 3b 09 0d 09 0d 09 41 45 |(&event)|;.....AE|
|000028b0| 44 69 73 70 6f 73 65 44 | 65 73 63 20 28 26 72 65 |DisposeD|esc (&re|
|000028c0| 70 6c 79 29 3b 0d 09 0d | 09 72 65 74 75 72 6e 20 |ply);...|.return |
|000028d0| 28 74 72 75 65 29 3b 0d | 09 0d 09 65 72 72 6f 72 |(true);.|...error|
|000028e0| 3a 0d 09 0d 09 41 45 44 | 69 73 70 6f 73 65 44 65 |:....AED|isposeDe|
|000028f0| 73 63 20 28 26 65 76 65 | 6e 74 29 3b 09 0d 09 0d |sc (&eve|nt);....|
|00002900| 09 69 66 20 28 66 6c 68 | 61 76 65 72 65 70 6c 79 |.if (flh|avereply|
|00002910| 29 0d 09 09 41 45 44 69 | 73 70 6f 73 65 44 65 73 |)...AEDi|sposeDes|
|00002920| 63 20 28 26 72 65 70 6c | 79 29 3b 0d 09 0d 09 72 |c (&repl|y);....r|
|00002930| 65 74 75 72 6e 20 28 66 | 61 6c 73 65 29 3b 0d 09 |eturn (f|alse);..|
|00002940| 7d 20 2f 2a 64 6f 69 6e | 73 74 61 6c 6c 2a 2f 0d |} /*doin|stall*/.|
|00002950| 09 0d 09 0d 73 74 61 74 | 69 63 20 42 6f 6f 6c 65 |....stat|ic Boole|
|00002960| 61 6e 20 64 6f 68 65 6c | 70 74 65 78 74 20 28 76 |an dohel|ptext (v|
|00002970| 6f 69 64 29 20 7b 0d 0d | 09 41 45 44 65 73 63 20 |oid) {..|.AEDesc |
|00002980| 64 65 73 63 3b 0d 09 4f | 53 45 72 72 20 65 63 3b |desc;..O|SErr ec;|
|00002990| 0d 09 42 6f 6f 6c 65 61 | 6e 20 66 6c 68 61 76 65 |..Boolea|n flhave|
|000029a0| 72 65 70 6c 79 20 3d 20 | 66 61 6c 73 65 3b 0d 09 |reply = |false;..|
|000029b0| 41 70 70 6c 65 45 76 65 | 6e 74 20 65 76 65 6e 74 |AppleEve|nt event|
|000029c0| 2c 20 72 65 70 6c 79 3b | 0d 09 53 74 72 32 35 35 |, reply;|..Str255|
|000029d0| 20 62 73 65 72 72 6f 72 | 3b 0d 09 0d 09 69 66 20 | bserror|;....if |
|000029e0| 28 21 49 41 43 6e 65 77 | 76 65 72 62 20 28 27 4c |(!IACnew|verb ('L|
|000029f0| 41 4e 44 27 2c 20 27 4f | 48 49 4f 27 2c 20 27 68 |AND', 'O|HIO', 'h|
|00002a00| 65 6c 70 27 2c 20 26 65 | 76 65 6e 74 29 29 0d 09 |elp', &e|vent))..|
|00002a10| 09 72 65 74 75 72 6e 20 | 28 66 61 6c 73 65 29 3b |.return |(false);|
|00002a20| 0d 09 09 0d 09 49 41 43 | 67 6c 6f 62 61 6c 73 2e |.....IAC|globals.|
|00002a30| 65 76 65 6e 74 20 3d 20 | 26 65 76 65 6e 74 3b 0d |event = |&event;.|
|00002a40| 09 0d 09 64 65 73 63 2e | 64 65 73 63 72 69 70 74 |...desc.|descript|
|00002a50| 6f 72 54 79 70 65 20 3d | 20 27 77 70 74 78 27 3b |orType =| 'wptx';|
|00002a60| 0d 09 0d 09 64 65 73 63 | 2e 64 61 74 61 48 61 6e |....desc|.dataHan|
|00002a70| 64 6c 65 20 3d 20 67 65 | 74 52 65 73 6f 75 72 63 |dle = ge|tResourc|
|00002a80| 65 41 6e 64 44 65 74 61 | 63 68 20 28 27 77 70 74 |eAndDeta|ch ('wpt|
|00002a90| 78 27 2c 20 31 32 38 29 | 3b 0d 09 0d 09 65 63 20 |x', 128)|;....ec |
|00002aa0| 3d 20 41 45 50 75 74 50 | 61 72 61 6d 44 65 73 63 |= AEPutP|aramDesc|
|00002ab0| 20 28 26 65 76 65 6e 74 | 2c 20 28 41 45 4b 65 79 | (&event|, (AEKey|
|00002ac0| 77 6f 72 64 29 20 27 2d | 2d 2d 2d 27 2c 20 26 64 |word) '-|---', &d|
|00002ad0| 65 73 63 29 3b 0d 09 0d | 09 41 45 44 69 73 70 6f |esc);...|.AEDispo|
|00002ae0| 73 65 44 65 73 63 20 28 | 26 64 65 73 63 29 3b 0d |seDesc (|&desc);.|
|00002af0| 09 0d 09 69 66 20 28 65 | 63 20 21 3d 20 6e 6f 45 |...if (e|c != noE|
|00002b00| 72 72 29 0d 09 09 72 65 | 74 75 72 6e 20 28 66 61 |rr)...re|turn (fa|
|00002b10| 6c 73 65 29 3b 0d 09 09 | 0d 09 64 65 73 63 2e 64 |lse);...|..desc.d|
|00002b20| 65 73 63 72 69 70 74 6f | 72 54 79 70 65 20 3d 20 |escripto|rType = |
|00002b30| 27 54 45 58 54 27 3b 20 | 2f 2a 44 57 20 37 2f 32 |'TEXT'; |/*DW 7/2|
|00002b40| 31 2f 39 32 20 2d 2d 20 | 66 6f 72 20 52 75 6e 74 |1/92 -- |for Runt|
|00002b50| 69 6d 65 2c 20 70 75 73 | 68 20 70 6c 61 69 6e 20 |ime, pus|h plain |
|00002b60| 74 65 78 74 20 6f 6e 20 | 74 68 65 20 41 45 2a 2f |text on |the AE*/|
|00002b70| 0d 09 0d 09 64 65 73 63 | 2e 64 61 74 61 48 61 6e |....desc|.dataHan|
|00002b80| 64 6c 65 20 3d 20 67 65 | 74 52 65 73 6f 75 72 63 |dle = ge|tResourc|
|00002b90| 65 41 6e 64 44 65 74 61 | 63 68 20 28 27 54 45 58 |eAndDeta|ch ('TEX|
|00002ba0| 54 27 2c 20 31 32 38 29 | 3b 0d 09 0d 09 65 63 20 |T', 128)|;....ec |
|00002bb0| 3d 20 41 45 50 75 74 50 | 61 72 61 6d 44 65 73 63 |= AEPutP|aramDesc|
|00002bc0| 20 28 26 65 76 65 6e 74 | 2c 20 28 41 45 4b 65 79 | (&event|, (AEKey|
|00002bd0| 77 6f 72 64 29 20 27 52 | 55 4e 54 27 2c 20 26 64 |word) 'R|UNT', &d|
|00002be0| 65 73 63 29 3b 0d 09 0d | 09 41 45 44 69 73 70 6f |esc);...|.AEDispo|
|00002bf0| 73 65 44 65 73 63 20 28 | 26 64 65 73 63 29 3b 0d |seDesc (|&desc);.|
|00002c00| 09 0d 09 69 66 20 28 65 | 63 20 21 3d 20 6e 6f 45 |...if (e|c != noE|
|00002c10| 72 72 29 0d 09 09 72 65 | 74 75 72 6e 20 28 66 61 |rr)...re|turn (fa|
|00002c20| 6c 73 65 29 3b 0d 09 09 | 0d 09 69 66 20 28 21 49 |lse);...|..if (!I|
|00002c30| 41 43 73 65 6e 64 76 65 | 72 62 20 28 26 65 76 65 |ACsendve|rb (&eve|
|00002c40| 6e 74 2c 20 26 72 65 70 | 6c 79 29 29 0d 09 09 67 |nt, &rep|ly))...g|
|00002c50| 6f 74 6f 20 65 72 72 6f | 72 3b 0d 09 0d 09 66 6c |oto erro|r;....fl|
|00002c60| 68 61 76 65 72 65 70 6c | 79 20 3d 20 74 72 75 65 |haverepl|y = true|
|00002c70| 3b 0d 09 0d 09 49 41 43 | 67 6c 6f 62 61 6c 73 2e |;....IAC|globals.|
|00002c80| 72 65 70 6c 79 20 3d 20 | 26 72 65 70 6c 79 3b 0d |reply = |&reply;.|
|00002c90| 09 0d 09 69 66 20 28 49 | 41 43 63 68 65 63 6b 65 |...if (I|ACchecke|
|00002ca0| 72 72 6f 72 20 28 62 73 | 65 72 72 6f 72 29 29 20 |rror (bs|error)) |
|00002cb0| 2f 2a 73 79 6e 74 61 78 | 20 65 72 72 6f 72 20 6f |/*syntax| error o|
|00002cc0| 72 20 72 75 6e 74 69 6d | 65 20 65 72 72 6f 72 2a |r runtim|e error*|
|00002cd0| 2f 0d 09 09 67 6f 74 6f | 20 65 72 72 6f 72 3b 0d |/...goto| error;.|
|00002ce0| 09 09 0d 09 49 41 43 67 | 6c 6f 62 61 6c 73 2e 65 |....IACg|lobals.e|
|00002cf0| 76 65 6e 74 20 3d 20 26 | 72 65 70 6c 79 3b 20 2f |vent = &|reply; /|
|00002d00| 2a 67 65 74 20 74 68 65 | 20 73 74 72 69 6e 67 20 |*get the| string |
|00002d10| 66 72 6f 6d 20 74 68 65 | 20 72 65 70 6c 79 20 72 |from the| reply r|
|00002d20| 65 63 6f 72 64 2a 2f 0d | 09 09 0d 09 41 45 44 69 |ecord*/.|....AEDi|
|00002d30| 73 70 6f 73 65 44 65 73 | 63 20 28 26 65 76 65 6e |sposeDes|c (&even|
|00002d40| 74 29 3b 09 0d 09 0d 09 | 41 45 44 69 73 70 6f 73 |t);.....|AEDispos|
|00002d50| 65 44 65 73 63 20 28 26 | 72 65 70 6c 79 29 3b 0d |eDesc (&|reply);.|
|00002d60| 09 0d 09 72 65 74 75 72 | 6e 20 28 74 72 75 65 29 |...retur|n (true)|
|00002d70| 3b 0d 09 0d 09 65 72 72 | 6f 72 3a 0d 09 0d 09 41 |;....err|or:....A|
|00002d80| 45 44 69 73 70 6f 73 65 | 44 65 73 63 20 28 26 65 |EDispose|Desc (&e|
|00002d90| 76 65 6e 74 29 3b 09 0d | 09 0d 09 69 66 20 28 66 |vent);..|...if (f|
|00002da0| 6c 68 61 76 65 72 65 70 | 6c 79 29 0d 09 09 41 45 |lhaverep|ly)...AE|
|00002db0| 44 69 73 70 6f 73 65 44 | 65 73 63 20 28 26 72 65 |DisposeD|esc (&re|
|00002dc0| 70 6c 79 29 3b 0d 09 0d | 09 72 65 74 75 72 6e 20 |ply);...|.return |
|00002dd0| 28 66 61 6c 73 65 29 3b | 0d 09 7d 20 2f 2a 64 6f |(false);|..} /*do|
|00002de0| 68 65 6c 70 74 65 78 74 | 2a 2f 0d 09 0d 09 0d 73 |helptext|*/.....s|
|00002df0| 74 61 74 69 63 20 42 6f | 6f 6c 65 61 6e 20 64 6f |tatic Bo|olean do|
|00002e00| 65 64 69 74 20 28 76 6f | 69 64 29 20 7b 0d 0d 09 |edit (vo|id) {...|
|00002e10| 41 45 44 65 73 63 20 64 | 65 73 63 3b 0d 09 4f 53 |AEDesc d|esc;..OS|
|00002e20| 45 72 72 20 65 63 3b 0d | 09 42 6f 6f 6c 65 61 6e |Err ec;.|.Boolean|
|00002e30| 20 66 6c 68 61 76 65 72 | 65 70 6c 79 20 3d 20 66 | flhaver|eply = f|
|00002e40| 61 6c 73 65 3b 0d 09 41 | 70 70 6c 65 45 76 65 6e |alse;..A|ppleEven|
|00002e50| 74 20 65 76 65 6e 74 2c | 20 72 65 70 6c 79 3b 0d |t event,| reply;.|
|00002e60| 09 53 74 72 32 35 35 20 | 62 73 65 72 72 6f 72 3b |.Str255 |bserror;|
|00002e70| 0d 09 0d 09 69 66 20 28 | 21 49 41 43 6e 65 77 76 |....if (|!IACnewv|
|00002e80| 65 72 62 20 28 27 4c 41 | 4e 44 27 2c 20 27 4f 48 |erb ('LA|ND', 'OH|
|00002e90| 49 4f 27 2c 20 27 65 64 | 69 74 27 2c 20 26 65 76 |IO', 'ed|it', &ev|
|00002ea0| 65 6e 74 29 29 0d 09 09 | 72 65 74 75 72 6e 20 28 |ent))...|return (|
|00002eb0| 66 61 6c 73 65 29 3b 0d | 09 09 0d 09 69 66 20 28 |false);.|....if (|
|00002ec0| 21 49 41 43 73 65 6e 64 | 76 65 72 62 20 28 26 65 |!IACsend|verb (&e|
|00002ed0| 76 65 6e 74 2c 20 26 72 | 65 70 6c 79 29 29 0d 09 |vent, &r|eply))..|
|00002ee0| 09 67 6f 74 6f 20 65 72 | 72 6f 72 3b 0d 09 0d 09 |.goto er|ror;....|
|00002ef0| 66 6c 68 61 76 65 72 65 | 70 6c 79 20 3d 20 74 72 |flhavere|ply = tr|
|00002f00| 75 65 3b 0d 09 0d 09 49 | 41 43 67 6c 6f 62 61 6c |ue;....I|ACglobal|
|00002f10| 73 2e 72 65 70 6c 79 20 | 3d 20 26 72 65 70 6c 79 |s.reply |= &reply|
|00002f20| 3b 0d 09 0d 09 69 66 20 | 28 49 41 43 63 68 65 63 |;....if |(IACchec|
|00002f30| 6b 65 72 72 6f 72 20 28 | 62 73 65 72 72 6f 72 29 |kerror (|bserror)|
|00002f40| 29 20 2f 2a 73 79 6e 74 | 61 78 20 65 72 72 6f 72 |) /*synt|ax error|
|00002f50| 20 6f 72 20 72 75 6e 74 | 69 6d 65 20 65 72 72 6f | or runt|ime erro|
|00002f60| 72 2a 2f 0d 09 09 67 6f | 74 6f 20 65 72 72 6f 72 |r*/...go|to error|
|00002f70| 3b 0d 09 09 0d 09 49 41 | 43 67 6c 6f 62 61 6c 73 |;.....IA|Cglobals|
|00002f80| 2e 65 76 65 6e 74 20 3d | 20 26 72 65 70 6c 79 3b |.event =| &reply;|
|00002f90| 20 2f 2a 67 65 74 20 74 | 68 65 20 73 74 72 69 6e | /*get t|he strin|
|00002fa0| 67 20 66 72 6f 6d 20 74 | 68 65 20 72 65 70 6c 79 |g from t|he reply|
|00002fb0| 20 72 65 63 6f 72 64 2a | 2f 0d 09 09 0d 09 41 45 | record*|/.....AE|
|00002fc0| 44 69 73 70 6f 73 65 44 | 65 73 63 20 28 26 65 76 |DisposeD|esc (&ev|
|00002fd0| 65 6e 74 29 3b 09 0d 09 | 0d 09 41 45 44 69 73 70 |ent);...|..AEDisp|
|00002fe0| 6f 73 65 44 65 73 63 20 | 28 26 72 65 70 6c 79 29 |oseDesc |(&reply)|
|00002ff0| 3b 0d 09 0d 09 72 65 74 | 75 72 6e 20 28 74 72 75 |;....ret|urn (tru|
|00003000| 65 29 3b 0d 09 0d 09 65 | 72 72 6f 72 3a 0d 09 0d |e);....e|rror:...|
|00003010| 09 41 45 44 69 73 70 6f | 73 65 44 65 73 63 20 28 |.AEDispo|seDesc (|
|00003020| 26 65 76 65 6e 74 29 3b | 09 0d 09 0d 09 69 66 20 |&event);|.....if |
|00003030| 28 66 6c 68 61 76 65 72 | 65 70 6c 79 29 0d 09 09 |(flhaver|eply)...|
|00003040| 41 45 44 69 73 70 6f 73 | 65 44 65 73 63 20 28 26 |AEDispos|eDesc (&|
|00003050| 72 65 70 6c 79 29 3b 0d | 09 0d 09 72 65 74 75 72 |reply);.|...retur|
|00003060| 6e 20 28 66 61 6c 73 65 | 29 3b 0d 09 7d 20 2f 2a |n (false|);..} /*|
|00003070| 64 6f 65 64 69 74 2a 2f | 0d 09 0d 09 0d 73 74 61 |doedit*/|.....sta|
|00003080| 74 69 63 20 42 6f 6f 6c | 65 61 6e 20 64 6f 66 69 |tic Bool|ean dofi|
|00003090| 6c 65 6c 69 73 74 20 28 | 76 6f 69 64 29 20 7b 0d |lelist (|void) {.|
|000030a0| 09 0d 09 6c 6f 6e 67 20 | 63 74 66 69 6c 65 73 3b |...long |ctfiles;|
|000030b0| 0d 09 44 65 73 63 54 79 | 70 65 20 61 63 74 75 61 |..DescTy|pe actua|
|000030c0| 6c 74 79 70 65 3b 0d 09 | 6c 6f 6e 67 20 61 63 74 |ltype;..|long act|
|000030d0| 75 61 6c 73 69 7a 65 3b | 0d 09 41 45 4b 65 79 77 |ualsize;|..AEKeyw|
|000030e0| 6f 72 64 20 61 63 74 75 | 61 6c 6b 65 79 77 6f 72 |ord actu|alkeywor|
|000030f0| 64 3b 0d 09 46 53 53 70 | 65 63 20 66 73 3b 0d 09 |d;..FSSp|ec fs;..|
|00003100| 6c 6f 6e 67 20 69 3b 0d | 09 4f 53 45 72 72 20 65 |long i;.|.OSErr e|
|00003110| 63 3b 0d 09 53 74 72 32 | 35 35 20 66 75 6c 6c 70 |c;..Str2|55 fullp|
|00003120| 61 74 68 3b 0d 09 0d 09 | 66 6c 6f 70 65 6e 68 61 |ath;....|flopenha|
|00003130| 6e 64 6c 65 64 20 3d 20 | 74 72 75 65 3b 0d 09 0d |ndled = |true;...|
|00003140| 09 66 6c 32 63 6c 69 63 | 6b 20 3d 20 66 61 6c 73 |.fl2clic|k = fals|
|00003150| 65 3b 20 2f 2a 69 74 20 | 77 61 73 20 61 20 64 72 |e; /*it |was a dr|
|00003160| 61 67 2d 61 6e 64 2d 64 | 72 6f 70 2a 2f 0d 09 0d |ag-and-d|rop*/...|
|00003170| 09 65 63 20 3d 20 41 45 | 43 6f 75 6e 74 49 74 65 |.ec = AE|CountIte|
|00003180| 6d 73 20 28 26 66 69 6c | 65 6c 69 73 74 2c 20 26 |ms (&fil|elist, &|
|00003190| 63 74 66 69 6c 65 73 29 | 3b 0d 09 0d 09 69 66 20 |ctfiles)|;....if |
|000031a0| 28 65 63 20 21 3d 20 6e | 6f 45 72 72 29 20 0d 09 |(ec != n|oErr) ..|
|000031b0| 09 72 65 74 75 72 6e 20 | 28 65 63 29 3b 0d 09 0d |.return |(ec);...|
|000031c0| 09 69 66 20 28 63 74 66 | 69 6c 65 73 20 3c 3d 20 |.if (ctf|iles <= |
|000031d0| 30 29 0d 09 09 72 65 74 | 75 72 6e 20 28 6e 6f 45 |0)...ret|urn (noE|
|000031e0| 72 72 29 3b 0d 09 0d 09 | 66 6f 72 20 28 69 20 3d |rr);....|for (i =|
|000031f0| 20 31 3b 20 69 20 3c 3d | 20 63 74 66 69 6c 65 73 | 1; i <=| ctfiles|
|00003200| 3b 20 69 20 2b 2b 29 20 | 7b 0d 09 09 0d 09 09 65 |; i ++) |{......e|
|00003210| 63 20 3d 20 41 45 47 65 | 74 4e 74 68 50 74 72 20 |c = AEGe|tNthPtr |
|00003220| 28 0d 09 09 09 26 66 69 | 6c 65 6c 69 73 74 2c 20 |(....&fi|lelist, |
|00003230| 69 2c 20 74 79 70 65 46 | 53 53 2c 20 26 61 63 74 |i, typeF|SS, &act|
|00003240| 75 61 6c 6b 65 79 77 6f | 72 64 2c 20 26 61 63 74 |ualkeywo|rd, &act|
|00003250| 75 61 6c 74 79 70 65 2c | 20 0d 09 09 09 0d 09 09 |ualtype,| .......|
|00003260| 09 28 50 74 72 29 20 26 | 66 73 2c 20 73 69 7a 65 |.(Ptr) &|fs, size|
|00003270| 6f 66 20 28 66 73 29 2c | 20 26 61 63 74 75 61 6c |of (fs),| &actual|
|00003280| 73 69 7a 65 29 3b 0d 09 | 09 0d 09 09 67 65 74 66 |size);..|....getf|
|00003290| 75 6c 6c 70 61 74 68 20 | 28 26 66 73 2c 20 66 75 |ullpath |(&fs, fu|
|000032a0| 6c 6c 70 61 74 68 29 3b | 0d 09 0d 09 09 69 66 20 |llpath);|.....if |
|000032b0| 28 21 70 72 6f 63 65 73 | 73 66 69 6c 65 20 28 66 |(!proces|sfile (f|
|000032c0| 75 6c 6c 70 61 74 68 29 | 29 20 7b 0d 09 09 09 0d |ullpath)|) {.....|
|000032d0| 09 09 09 64 6f 63 6c 6f | 73 65 64 6f 77 6e 20 28 |...doclo|sedown (|
|000032e0| 29 3b 0d 09 09 09 0d 09 | 09 09 72 65 74 75 72 6e |);......|..return|
|000032f0| 20 28 2d 31 29 3b 0d 09 | 09 09 7d 0d 09 09 7d 20 | (-1);..|..}...} |
|00003300| 2f 2a 66 6f 72 2a 2f 0d | 09 0d 09 64 6f 63 6c 6f |/*for*/.|...doclo|
|00003310| 73 65 64 6f 77 6e 20 28 | 29 3b 0d 09 0d 09 72 65 |sedown (|);....re|
|00003320| 74 75 72 6e 20 28 6e 6f | 45 72 72 29 3b 0d 09 7d |turn (no|Err);..}|
|00003330| 20 2f 2a 64 6f 66 69 6c | 65 6c 69 73 74 2a 2f 0d | /*dofil|elist*/.|
|00003340| 0d 0d 73 74 61 74 69 63 | 20 42 6f 6f 6c 65 61 6e |..static| Boolean|
|00003350| 20 61 70 70 52 75 6e 6e | 69 6e 67 20 28 4f 53 54 | appRunn|ing (OST|
|00003360| 79 70 65 20 61 70 70 69 | 64 29 20 7b 0d 09 0d 09 |ype appi|d) {....|
|00003370| 2f 2a 0d 09 72 65 74 75 | 72 6e 20 74 72 75 65 20 |/*..retu|rn true |
|00003380| 69 66 20 74 68 65 20 73 | 65 72 76 65 72 20 61 70 |if the s|erver ap|
|00003390| 70 6c 69 63 61 74 69 6f | 6e 20 69 73 20 72 75 6e |plicatio|n is run|
|000033a0| 6e 69 6e 67 2e 20 0d 09 | 2a 2f 0d 09 0d 09 50 72 |ning. ..|*/....Pr|
|000033b0| 6f 63 65 73 73 49 6e 66 | 6f 52 65 63 20 69 6e 66 |ocessInf|oRec inf|
|000033c0| 6f 3b 0d 09 50 72 6f 63 | 65 73 73 53 65 72 69 61 |o;..Proc|essSeria|
|000033d0| 6c 4e 75 6d 62 65 72 20 | 70 73 6e 3b 0d 09 53 74 |lNumber |psn;..St|
|000033e0| 72 32 35 35 20 62 73 6e | 61 6d 65 3b 0d 09 46 53 |r255 bsn|ame;..FS|
|000033f0| 53 70 65 63 20 66 73 73 | 3b 0d 09 0d 09 69 6e 66 |Spec fss|;....inf|
|00003400| 6f 2e 70 72 6f 63 65 73 | 73 49 6e 66 6f 4c 65 6e |o.proces|sInfoLen|
|00003410| 67 74 68 20 3d 20 73 69 | 7a 65 6f 66 20 28 69 6e |gth = si|zeof (in|
|00003420| 66 6f 29 3b 0d 09 0d 09 | 69 6e 66 6f 2e 70 72 6f |fo);....|info.pro|
|00003430| 63 65 73 73 4e 61 6d 65 | 20 3d 20 62 73 6e 61 6d |cessName| = bsnam|
|00003440| 65 3b 20 2f 2a 70 6c 61 | 63 65 20 74 6f 20 73 74 |e; /*pla|ce to st|
|00003450| 6f 72 65 20 70 72 6f 63 | 65 73 73 20 6e 61 6d 65 |ore proc|ess name|
|00003460| 2a 2f 0d 09 0d 09 69 6e | 66 6f 2e 70 72 6f 63 65 |*/....in|fo.proce|
|00003470| 73 73 41 70 70 53 70 65 | 63 20 3d 20 26 66 73 73 |ssAppSpe|c = &fss|
|00003480| 3b 20 2f 2a 70 6c 61 63 | 65 20 74 6f 20 73 74 6f |; /*plac|e to sto|
|00003490| 72 65 20 70 72 6f 63 65 | 73 73 20 66 69 6c 65 73 |re proce|ss files|
|000034a0| 70 65 63 2a 2f 0d 09 0d | 09 70 73 6e 2e 68 69 67 |pec*/...|.psn.hig|
|000034b0| 68 4c 6f 6e 67 4f 66 50 | 53 4e 20 3d 20 6b 4e 6f |hLongOfP|SN = kNo|
|000034c0| 50 72 6f 63 65 73 73 3b | 0d 09 0d 09 70 73 6e 2e |Process;|....psn.|
|000034d0| 6c 6f 77 4c 6f 6e 67 4f | 66 50 53 4e 20 3d 20 6b |lowLongO|fPSN = k|
|000034e0| 4e 6f 50 72 6f 63 65 73 | 73 3b 0d 09 0d 09 77 68 |NoProces|s;....wh|
|000034f0| 69 6c 65 20 28 47 65 74 | 4e 65 78 74 50 72 6f 63 |ile (Get|NextProc|
|00003500| 65 73 73 20 28 26 70 73 | 6e 29 20 3d 3d 20 6e 6f |ess (&ps|n) == no|
|00003510| 45 72 72 29 20 7b 0d 09 | 09 0d 09 20 09 69 6e 66 |Err) {..|... .inf|
|00003520| 6f 2e 70 72 6f 63 65 73 | 73 49 6e 66 6f 4c 65 6e |o.proces|sInfoLen|
|00003530| 67 74 68 20 3d 20 73 69 | 7a 65 6f 66 20 28 50 72 |gth = si|zeof (Pr|
|00003540| 6f 63 65 73 73 49 6e 66 | 6f 52 65 63 29 3b 0d 09 |ocessInf|oRec);..|
|00003550| 20 09 0d 09 09 69 66 20 | 28 47 65 74 50 72 6f 63 | ....if |(GetProc|
|00003560| 65 73 73 49 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 28 |essInfor|mation (|
|00003570| 26 70 73 6e 2c 20 26 69 | 6e 66 6f 29 20 21 3d 20 |&psn, &i|nfo) != |
|00003580| 6e 6f 45 72 72 29 0d 09 | 09 09 63 6f 6e 74 69 6e |noErr)..|..contin|
|00003590| 75 65 3b 20 2f 2a 6b 65 | 65 70 20 67 6f 69 6e 67 |ue; /*ke|ep going|
|000035a0| 20 2d 2d 20 69 67 6e 6f | 72 65 20 65 72 72 6f 72 | -- igno|re error|
|000035b0| 2a 2f 0d 09 09 0d 09 09 | 69 66 20 28 69 6e 66 6f |*/......|if (info|
|000035c0| 2e 70 72 6f 63 65 73 73 | 53 69 67 6e 61 74 75 72 |.process|Signatur|
|000035d0| 65 20 3d 3d 20 61 70 70 | 69 64 29 0d 09 09 09 72 |e == app|id)....r|
|000035e0| 65 74 75 72 6e 20 28 74 | 72 75 65 29 3b 0d 09 09 |eturn (t|rue);...|
|000035f0| 7d 20 2f 2a 77 68 69 6c | 65 2a 2f 0d 09 0d 09 72 |} /*whil|e*/....r|
|00003600| 65 74 75 72 6e 20 28 66 | 61 6c 73 65 29 3b 20 2f |eturn (f|alse); /|
|00003610| 2a 6c 6f 6f 70 20 63 6f | 6d 70 6c 65 74 65 64 2c |*loop co|mpleted,|
|00003620| 20 6e 6f 20 73 65 72 76 | 65 72 2a 2f 0d 09 7d 20 | no serv|er*/..} |
|00003630| 2f 2a 61 70 70 52 75 6e | 6e 69 6e 67 2a 2f 0d 0d |/*appRun|ning*/..|
|00003640| 0d 73 74 61 74 69 63 20 | 42 6f 6f 6c 65 61 6e 20 |.static |Boolean |
|00003650| 68 61 73 64 65 73 6b 74 | 6f 70 6d 61 6e 61 67 65 |hasdeskt|opmanage|
|00003660| 72 20 28 73 68 6f 72 74 | 20 76 6e 75 6d 29 20 7b |r (short| vnum) {|
|00003670| 0d 09 0d 09 47 65 74 56 | 6f 6c 50 61 72 6d 73 49 |....GetV|olParmsI|
|00003680| 6e 66 6f 42 75 66 66 65 | 72 20 76 6f 6c 70 61 72 |nfoBuffe|r volpar|
|00003690| 6d 73 3b 0d 09 48 50 61 | 72 61 6d 42 6c 6f 63 6b |ms;..HPa|ramBlock|
|000036a0| 52 65 63 20 70 62 3b 0d | 09 0d 09 70 62 2e 76 6f |Rec pb;.|...pb.vo|
|000036b0| 6c 75 6d 65 50 61 72 61 | 6d 2e 69 6f 56 52 65 66 |lumePara|m.ioVRef|
|000036c0| 4e 75 6d 20 3d 20 76 6e | 75 6d 3b 0d 09 0d 09 70 |Num = vn|um;....p|
|000036d0| 62 2e 76 6f 6c 75 6d 65 | 50 61 72 61 6d 2e 69 6f |b.volume|Param.io|
|000036e0| 4e 61 6d 65 50 74 72 20 | 3d 20 6e 69 6c 3b 0d 09 |NamePtr |= nil;..|
|000036f0| 0d 09 70 62 2e 69 6f 50 | 61 72 61 6d 2e 69 6f 42 |..pb.ioP|aram.ioB|
|00003700| 75 66 66 65 72 20 3d 20 | 28 50 74 72 29 20 26 76 |uffer = |(Ptr) &v|
|00003710| 6f 6c 70 61 72 6d 73 3b | 0d 09 0d 09 70 62 2e 69 |olparms;|....pb.i|
|00003720| 6f 50 61 72 61 6d 2e 69 | 6f 52 65 71 43 6f 75 6e |oParam.i|oReqCoun|
|00003730| 74 20 3d 20 73 69 7a 65 | 6f 66 20 28 76 6f 6c 70 |t = size|of (volp|
|00003740| 61 72 6d 73 29 3b 0d 09 | 0d 09 69 66 20 28 50 42 |arms);..|..if (PB|
|00003750| 48 47 65 74 56 6f 6c 50 | 61 72 6d 73 53 79 6e 63 |HGetVolP|armsSync|
|00003760| 20 28 26 70 62 29 20 21 | 3d 20 6e 6f 45 72 72 29 | (&pb) !|= noErr)|
|00003770| 0d 09 09 72 65 74 75 72 | 6e 20 28 66 61 6c 73 65 |...retur|n (false|
|00003780| 29 3b 0d 09 0d 09 72 65 | 74 75 72 6e 20 28 28 76 |);....re|turn ((v|
|00003790| 6f 6c 70 61 72 6d 73 2e | 76 4d 41 74 74 72 69 62 |olparms.|vMAttrib|
|000037a0| 20 26 20 28 31 20 3c 3c | 20 62 48 61 73 44 65 73 | & (1 <<| bHasDes|
|000037b0| 6b 74 6f 70 4d 67 72 29 | 29 20 21 3d 20 30 29 3b |ktopMgr)|) != 0);|
|000037c0| 0d 09 7d 20 2f 2a 68 61 | 73 64 65 73 6b 74 6f 70 |..} /*ha|sdesktop|
|000037d0| 6d 61 6e 61 67 65 72 2a | 2f 0d 0d 0d 73 74 61 74 |manager*|/...stat|
|000037e0| 69 63 20 42 6f 6f 6c 65 | 61 6e 20 66 69 6e 64 41 |ic Boole|an findA|
|000037f0| 70 70 20 28 4f 53 54 79 | 70 65 20 61 70 70 69 64 |pp (OSTy|pe appid|
|00003800| 2c 20 46 53 53 70 65 63 | 20 2a 66 73 29 20 7b 0d |, FSSpec| *fs) {.|
|00003810| 09 0d 09 2f 2a 0d 09 66 | 69 6e 64 20 74 68 65 20 |.../*..f|ind the |
|00003820| 61 70 70 20 77 68 6f 73 | 65 20 63 72 65 61 74 6f |app whos|e creato|
|00003830| 72 20 69 64 20 69 73 20 | 61 70 70 69 64 2e 20 72 |r id is |appid. r|
|00003840| 65 74 75 72 6e 20 74 72 | 75 65 20 69 66 20 77 65 |eturn tr|ue if we|
|00003850| 20 66 6f 75 6e 64 20 69 | 74 2c 20 0d 09 66 61 6c | found i|t, ..fal|
|00003860| 73 65 20 6f 74 68 65 72 | 77 69 73 65 2e 0d 09 2a |se other|wise...*|
|00003870| 2f 0d 09 0d 09 44 54 50 | 42 52 65 63 20 64 74 3b |/....DTP|BRec dt;|
|00003880| 0d 09 50 61 72 61 6d 42 | 6c 6f 63 6b 52 65 63 20 |..ParamB|lockRec |
|00003890| 70 62 3b 0d 09 53 74 72 | 32 35 35 20 61 70 70 66 |pb;..Str|255 appf|
|000038a0| 6e 61 6d 65 3b 0d 09 0d | 09 63 6c 65 61 72 62 79 |name;...|.clearby|
|000038b0| 74 65 73 20 28 26 70 62 | 2c 20 28 6c 6f 6e 67 29 |tes (&pb|, (long)|
|000038c0| 20 73 69 7a 65 6f 66 20 | 28 70 62 29 29 3b 0d 09 | sizeof |(pb));..|
|000038d0| 0d 09 77 68 69 6c 65 20 | 28 74 72 75 65 29 20 7b |..while |(true) {|
|000038e0| 0d 09 09 0d 09 09 2b 2b | 70 62 2e 76 6f 6c 75 6d |......++|pb.volum|
|000038f0| 65 50 61 72 61 6d 2e 69 | 6f 56 6f 6c 49 6e 64 65 |eParam.i|oVolInde|
|00003900| 78 3b 0d 09 09 0d 09 09 | 69 66 20 28 50 42 47 65 |x;......|if (PBGe|
|00003910| 74 56 49 6e 66 6f 53 79 | 6e 63 20 28 26 70 62 29 |tVInfoSy|nc (&pb)|
|00003920| 20 21 3d 20 6e 6f 45 72 | 72 29 0d 09 09 09 72 65 | != noEr|r)....re|
|00003930| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 09 |turn (fa|lse);...|
|00003940| 0d 09 09 69 66 20 28 21 | 68 61 73 64 65 73 6b 74 |...if (!|hasdeskt|
|00003950| 6f 70 6d 61 6e 61 67 65 | 72 20 28 70 62 2e 76 6f |opmanage|r (pb.vo|
|00003960| 6c 75 6d 65 50 61 72 61 | 6d 2e 69 6f 56 52 65 66 |lumePara|m.ioVRef|
|00003970| 4e 75 6d 29 29 0d 09 09 | 09 63 6f 6e 74 69 6e 75 |Num))...|.continu|
|00003980| 65 3b 0d 09 09 0d 09 09 | 64 74 2e 69 6f 4e 61 6d |e;......|dt.ioNam|
|00003990| 65 50 74 72 20 3d 20 4e | 55 4c 4c 3b 0d 09 09 0d |ePtr = N|ULL;....|
|000039a0| 09 09 64 74 2e 69 6f 56 | 52 65 66 4e 75 6d 20 3d |..dt.ioV|RefNum =|
|000039b0| 20 70 62 2e 76 6f 6c 75 | 6d 65 50 61 72 61 6d 2e | pb.volu|meParam.|
|000039c0| 69 6f 56 52 65 66 4e 75 | 6d 3b 0d 09 09 0d 09 09 |ioVRefNu|m;......|
|000039d0| 69 66 20 28 50 42 44 54 | 47 65 74 50 61 74 68 20 |if (PBDT|GetPath |
|000039e0| 28 26 64 74 29 20 21 3d | 20 6e 6f 45 72 72 29 0d |(&dt) !=| noErr).|
|000039f0| 09 09 09 72 65 74 75 72 | 6e 20 28 66 61 6c 73 65 |...retur|n (false|
|00003a00| 29 3b 0d 09 09 0d 09 09 | 64 74 2e 69 6f 4e 61 6d |);......|dt.ioNam|
|00003a10| 65 50 74 72 20 3d 20 28 | 53 74 72 69 6e 67 50 74 |ePtr = (|StringPt|
|00003a20| 72 29 20 26 61 70 70 66 | 6e 61 6d 65 3b 0d 09 09 |r) &appf|name;...|
|00003a30| 0d 09 09 64 74 2e 69 6f | 49 6e 64 65 78 20 3d 20 |...dt.io|Index = |
|00003a40| 30 3b 0d 09 09 0d 09 09 | 64 74 2e 69 6f 46 69 6c |0;......|dt.ioFil|
|00003a50| 65 43 72 65 61 74 6f 72 | 20 3d 20 61 70 70 69 64 |eCreator| = appid|
|00003a60| 3b 0d 09 09 0d 09 09 69 | 66 20 28 50 42 44 54 47 |;......i|f (PBDTG|
|00003a70| 65 74 41 50 50 4c 53 79 | 6e 63 20 28 26 64 74 29 |etAPPLSy|nc (&dt)|
|00003a80| 20 3d 3d 20 6e 6f 45 72 | 72 29 20 7b 0d 09 09 0d | == noEr|r) {....|
|00003a90| 09 09 09 69 66 20 28 46 | 53 4d 61 6b 65 46 53 53 |...if (F|SMakeFSS|
|00003aa0| 70 65 63 20 28 70 62 2e | 76 6f 6c 75 6d 65 50 61 |pec (pb.|volumePa|
|00003ab0| 72 61 6d 2e 69 6f 56 52 | 65 66 4e 75 6d 2c 20 64 |ram.ioVR|efNum, d|
|00003ac0| 74 2e 69 6f 41 50 50 4c | 50 61 72 49 44 2c 20 61 |t.ioAPPL|ParID, a|
|00003ad0| 70 70 66 6e 61 6d 65 2c | 20 66 73 29 20 3d 3d 20 |ppfname,| fs) == |
|00003ae0| 6e 6f 45 72 72 29 0d 09 | 09 09 09 72 65 74 75 72 |noErr)..|...retur|
|00003af0| 6e 20 28 74 72 75 65 29 | 3b 0d 09 09 09 7d 0d 09 |n (true)|;....}..|
|00003b00| 09 7d 20 2f 2a 77 68 69 | 6c 65 2a 2f 0d 09 09 0d |.} /*whi|le*/....|
|00003b10| 09 72 65 74 75 72 6e 20 | 28 66 61 6c 73 65 29 3b |.return |(false);|
|00003b20| 0d 09 7d 20 2f 2a 66 69 | 6e 64 41 70 70 2a 2f 0d |..} /*fi|ndApp*/.|
|00003b30| 0d 0d 73 74 61 74 69 63 | 20 42 6f 6f 6c 65 61 6e |..static| Boolean|
|00003b40| 20 6c 61 75 6e 63 68 41 | 70 70 20 28 46 53 53 70 | launchA|pp (FSSp|
|00003b50| 65 63 20 2a 66 73 29 20 | 7b 0d 09 0d 09 4c 61 75 |ec *fs) |{....Lau|
|00003b60| 6e 63 68 50 61 72 61 6d | 42 6c 6f 63 6b 52 65 63 |nchParam|BlockRec|
|00003b70| 20 70 62 3b 0d 09 4f 53 | 45 72 72 20 65 72 72 63 | pb;..OS|Err errc|
|00003b80| 6f 64 65 3b 0d 09 0d 09 | 63 6c 65 61 72 62 79 74 |ode;....|clearbyt|
|00003b90| 65 73 20 28 26 70 62 2c | 20 28 6c 6f 6e 67 29 20 |es (&pb,| (long) |
|00003ba0| 73 69 7a 65 6f 66 20 28 | 70 62 29 29 3b 0d 09 0d |sizeof (|pb));...|
|00003bb0| 09 70 62 2e 6c 61 75 6e | 63 68 41 70 70 53 70 65 |.pb.laun|chAppSpe|
|00003bc0| 63 20 3d 20 66 73 3b 0d | 09 0d 09 70 62 2e 6c 61 |c = fs;.|...pb.la|
|00003bd0| 75 6e 63 68 42 6c 6f 63 | 6b 49 44 20 3d 20 65 78 |unchBloc|kID = ex|
|00003be0| 74 65 6e 64 65 64 42 6c | 6f 63 6b 3b 0d 09 0d 09 |tendedBl|ock;....|
|00003bf0| 70 62 2e 6c 61 75 6e 63 | 68 45 50 42 4c 65 6e 67 |pb.launc|hEPBLeng|
|00003c00| 74 68 20 3d 20 65 78 74 | 65 6e 64 65 64 42 6c 6f |th = ext|endedBlo|
|00003c10| 63 6b 4c 65 6e 3b 0d 09 | 0d 09 70 62 2e 6c 61 75 |ckLen;..|..pb.lau|
|00003c20| 6e 63 68 43 6f 6e 74 72 | 6f 6c 46 6c 61 67 73 20 |nchContr|olFlags |
|00003c30| 3d 20 6c 61 75 6e 63 68 | 43 6f 6e 74 69 6e 75 65 |= launch|Continue|
|00003c40| 20 7c 20 6c 61 75 6e 63 | 68 4e 6f 46 69 6c 65 46 | | launc|hNoFileF|
|00003c50| 6c 61 67 73 2f 2a 20 7c | 20 6c 61 75 6e 63 68 44 |lags/* || launchD|
|00003c60| 6f 6e 74 53 77 69 74 63 | 68 2a 2f 3b 0d 09 0d 09 |ontSwitc|h*/;....|
|00003c70| 72 65 74 75 72 6e 20 28 | 4c 61 75 6e 63 68 41 70 |return (|LaunchAp|
|00003c80| 70 6c 69 63 61 74 69 6f | 6e 20 28 26 70 62 29 20 |plicatio|n (&pb) |
|00003c90| 3d 3d 20 6e 6f 45 72 72 | 29 3b 0d 09 7d 20 2f 2a |== noErr|);..} /*|
|00003ca0| 6c 61 75 6e 63 68 41 70 | 70 2a 2f 0d 0d 0d 73 74 |launchAp|p*/...st|
|00003cb0| 61 74 69 63 20 42 6f 6f | 6c 65 61 6e 20 6c 61 75 |atic Boo|lean lau|
|00003cc0| 6e 63 68 53 65 72 76 65 | 72 20 28 4f 53 54 79 70 |nchServe|r (OSTyp|
|00003cd0| 65 20 73 65 72 76 65 72 | 69 64 29 20 7b 0d 09 0d |e server|id) {...|
|00003ce0| 09 2f 2a 0d 09 69 66 20 | 74 68 65 20 61 70 70 6c |./*..if |the appl|
|00003cf0| 69 63 61 74 69 6f 6e 20 | 77 68 6f 73 65 20 63 72 |ication |whose cr|
|00003d00| 65 61 74 6f 72 20 69 64 | 20 69 73 20 73 65 72 76 |eator id| is serv|
|00003d10| 65 72 69 64 20 69 73 20 | 72 75 6e 6e 69 6e 67 2c |erid is |running,|
|00003d20| 20 72 65 74 75 72 6e 20 | 74 72 75 65 2e 0d 09 0d | return |true....|
|00003d30| 09 69 66 20 6e 6f 74 2c | 20 77 65 20 6c 6f 6f 6b |.if not,| we look|
|00003d40| 20 66 6f 72 20 74 68 65 | 20 61 70 70 6c 69 63 61 | for the| applica|
|00003d50| 74 69 6f 6e 20 61 6e 64 | 20 74 72 79 20 74 6f 20 |tion and| try to |
|00003d60| 6c 61 75 6e 63 68 20 69 | 74 2e 20 77 65 20 77 61 |launch i|t. we wa|
|00003d70| 69 74 20 75 6e 74 69 6c | 20 69 74 27 73 20 0d 09 |it until| it's ..|
|00003d80| 61 63 74 75 61 6c 6c 79 | 20 72 75 6e 6e 69 6e 67 |actually| running|
|00003d90| 20 61 6e 64 20 72 65 61 | 64 79 20 74 6f 20 72 65 | and rea|dy to re|
|00003da0| 63 65 69 76 65 20 41 70 | 70 6c 65 20 45 76 65 6e |ceive Ap|ple Even|
|00003db0| 74 73 2e 0d 09 2a 2f 0d | 09 0d 09 46 53 53 70 65 |ts...*/.|...FSSpe|
|00003dc0| 63 20 66 73 3b 0d 09 0d | 09 69 66 20 28 61 70 70 |c fs;...|.if (app|
|00003dd0| 52 75 6e 6e 69 6e 67 20 | 28 73 65 72 76 65 72 69 |Running |(serveri|
|00003de0| 64 29 29 0d 09 09 72 65 | 74 75 72 6e 20 28 74 72 |d))...re|turn (tr|
|00003df0| 75 65 29 3b 0d 09 09 0d | 09 69 66 20 28 21 66 69 |ue);....|.if (!fi|
|00003e00| 6e 64 41 70 70 20 28 73 | 65 72 76 65 72 69 64 2c |ndApp (s|erverid,|
|00003e10| 20 26 66 73 29 29 0d 09 | 09 72 65 74 75 72 6e 20 | &fs))..|.return |
|00003e20| 28 66 61 6c 73 65 29 3b | 0d 09 09 0d 09 69 66 20 |(false);|.....if |
|00003e30| 28 21 6c 61 75 6e 63 68 | 41 70 70 20 28 26 66 73 |(!launch|App (&fs|
|00003e40| 29 29 0d 09 09 72 65 74 | 75 72 6e 20 28 66 61 6c |))...ret|urn (fal|
|00003e50| 73 65 29 3b 0d 09 09 0d | 09 77 68 69 6c 65 20 28 |se);....|.while (|
|00003e60| 21 61 70 70 52 75 6e 6e | 69 6e 67 20 28 73 65 72 |!appRunn|ing (ser|
|00003e70| 76 65 72 69 64 29 29 20 | 7b 0d 09 09 0d 09 09 45 |verid)) |{......E|
|00003e80| 76 65 6e 74 52 65 63 6f | 72 64 20 65 76 3b 0d 09 |ventReco|rd ev;..|
|00003e90| 09 0d 09 09 45 76 65 6e | 74 41 76 61 69 6c 20 28 |....Even|tAvail (|
|00003ea0| 65 76 65 72 79 45 76 65 | 6e 74 2c 20 26 65 76 29 |everyEve|nt, &ev)|
|00003eb0| 3b 0d 09 09 7d 20 2f 2a | 77 68 69 6c 65 2a 2f 0d |;...} /*|while*/.|
|00003ec0| 09 09 0d 09 72 65 74 75 | 72 6e 20 28 74 72 75 65 |....retu|rn (true|
|00003ed0| 29 3b 0d 09 7d 20 2f 2a | 6c 61 75 6e 63 68 53 65 |);..} /*|launchSe|
|00003ee0| 72 76 65 72 2a 2f 0d 09 | 0d 09 0d 73 74 61 74 69 |rver*/..|...stati|
|00003ef0| 63 20 70 61 73 63 61 6c | 20 4f 53 45 72 72 20 68 |c pascal| OSErr h|
|00003f00| 61 6e 64 6c 65 6f 70 65 | 6e 20 28 41 70 70 6c 65 |andleope|n (Apple|
|00003f10| 45 76 65 6e 74 20 2a 65 | 76 65 6e 74 2c 20 41 70 |Event *e|vent, Ap|
|00003f20| 70 6c 65 45 76 65 6e 74 | 20 2a 72 65 70 6c 79 2c |pleEvent| *reply,|
|00003f30| 20 6c 6f 6e 67 20 72 65 | 66 63 6f 6e 29 20 7b 0d | long re|fcon) {.|
|00003f40| 09 0d 09 4f 53 45 72 72 | 20 65 63 3b 0d 09 0d 09 |...OSErr| ec;....|
|00003f50| 66 6c 6f 70 65 6e 68 61 | 6e 64 6c 65 64 20 3d 20 |flopenha|ndled = |
|00003f60| 74 72 75 65 3b 0d 09 0d | 09 66 6c 32 63 6c 69 63 |true;...|.fl2clic|
|00003f70| 6b 20 3d 20 66 61 6c 73 | 65 3b 20 2f 2a 69 74 20 |k = fals|e; /*it |
|00003f80| 77 61 73 20 61 20 64 72 | 61 67 2d 61 6e 64 2d 64 |was a dr|ag-and-d|
|00003f90| 72 6f 70 2a 2f 0d 09 0d | 09 65 63 20 3d 20 41 45 |rop*/...|.ec = AE|
|00003fa0| 47 65 74 4b 65 79 44 65 | 73 63 20 28 65 76 65 6e |GetKeyDe|sc (even|
|00003fb0| 74 2c 20 6b 65 79 44 69 | 72 65 63 74 4f 62 6a 65 |t, keyDi|rectObje|
|00003fc0| 63 74 2c 20 74 79 70 65 | 41 45 4c 69 73 74 2c 20 |ct, type|AEList, |
|00003fd0| 26 66 69 6c 65 6c 69 73 | 74 29 3b 0d 09 0d 09 72 |&filelis|t);....r|
|00003fe0| 65 74 75 72 6e 20 28 65 | 63 29 3b 0d 09 7d 20 2f |eturn (e|c);..} /|
|00003ff0| 2a 68 61 6e 64 6c 65 6f | 70 65 6e 2a 2f 0d 0d 0d |*handleo|pen*/...|
|00004000| 73 74 61 74 69 63 20 70 | 61 73 63 61 6c 20 4f 53 |static p|ascal OS|
|00004010| 45 72 72 20 68 61 6e 64 | 6c 65 6f 70 65 6e 61 70 |Err hand|leopenap|
|00004020| 70 20 28 41 70 70 6c 65 | 45 76 65 6e 74 20 2a 65 |p (Apple|Event *e|
|00004030| 76 65 6e 74 2c 20 41 70 | 70 6c 65 45 76 65 6e 74 |vent, Ap|pleEvent|
|00004040| 20 2a 72 65 70 6c 79 2c | 20 6c 6f 6e 67 20 72 65 | *reply,| long re|
|00004050| 66 63 6f 6e 29 20 7b 0d | 09 0d 09 66 6c 6f 70 65 |fcon) {.|...flope|
|00004060| 6e 68 61 6e 64 6c 65 64 | 20 3d 20 74 72 75 65 3b |nhandled| = true;|
|00004070| 0d 09 0d 09 66 6c 32 63 | 6c 69 63 6b 20 3d 20 74 |....fl2c|lick = t|
|00004080| 72 75 65 3b 20 2f 2a 6c | 61 75 6e 63 68 65 64 20 |rue; /*l|aunched |
|00004090| 62 79 20 32 63 6c 69 63 | 6b 69 6e 67 2a 2f 0d 09 |by 2clic|king*/..|
|000040a0| 0d 09 72 65 74 75 72 6e | 20 28 6e 6f 45 72 72 29 |..return| (noErr)|
|000040b0| 3b 0d 09 7d 20 2f 2a 68 | 61 6e 64 6c 65 6f 70 65 |;..} /*h|andleope|
|000040c0| 6e 61 70 70 2a 2f 0d 09 | 0d 0d 73 74 61 74 69 63 |napp*/..|..static|
|000040d0| 20 76 6f 69 64 20 64 72 | 61 77 69 74 65 6d 74 65 | void dr|awitemte|
|000040e0| 78 74 20 28 44 69 61 6c | 6f 67 50 74 72 20 70 64 |xt (Dial|ogPtr pd|
|000040f0| 69 61 6c 6f 67 2c 20 73 | 68 6f 72 74 20 69 74 65 |ialog, s|hort ite|
|00004100| 6d 6e 75 6d 62 65 72 2c | 20 48 61 6e 64 6c 65 20 |mnumber,| Handle |
|00004110| 68 74 65 78 74 29 20 7b | 0d 0d 09 73 68 6f 72 74 |htext) {|...short|
|00004120| 20 69 74 65 6d 74 79 70 | 65 3b 0d 09 48 61 6e 64 | itemtyp|e;..Hand|
|00004130| 6c 65 20 69 74 65 6d 68 | 61 6e 64 6c 65 3b 0d 09 |le itemh|andle;..|
|00004140| 52 65 63 74 20 69 74 65 | 6d 72 65 63 74 3b 0d 09 |Rect ite|mrect;..|
|00004150| 73 68 6f 72 74 20 73 61 | 76 65 64 66 6f 6e 74 2c |short sa|vedfont,|
|00004160| 20 73 61 76 65 64 73 69 | 7a 65 3b 0d 09 52 65 63 | savedsi|ze;..Rec|
|00004170| 74 20 72 3b 0d 09 50 65 | 6e 53 74 61 74 65 20 73 |t r;..Pe|nState s|
|00004180| 61 76 65 64 70 65 6e 3b | 0d 09 73 68 6f 72 74 20 |avedpen;|..short |
|00004190| 66 6e 75 6d 3b 0d 09 0d | 09 73 61 76 65 64 66 6f |fnum;...|.savedfo|
|000041a0| 6e 74 20 3d 20 28 2a 74 | 68 65 50 6f 72 74 29 2e |nt = (*t|hePort).|
|000041b0| 74 78 46 6f 6e 74 3b 0d | 09 0d 09 73 61 76 65 64 |txFont;.|...saved|
|000041c0| 73 69 7a 65 20 3d 20 28 | 2a 74 68 65 50 6f 72 74 |size = (|*thePort|
|000041d0| 29 2e 74 78 53 69 7a 65 | 3b 0d 09 0d 09 47 65 74 |).txSize|;....Get|
|000041e0| 46 4e 75 6d 20 28 22 5c | 70 50 61 6c 61 74 69 6e |FNum ("\|pPalatin|
|000041f0| 6f 22 2c 20 26 66 6e 75 | 6d 29 3b 0d 09 0d 09 54 |o", &fnu|m);....T|
|00004200| 65 78 74 46 6f 6e 74 20 | 28 66 6e 75 6d 29 3b 0d |extFont |(fnum);.|
|00004210| 09 0d 09 54 65 78 74 53 | 69 7a 65 20 28 31 32 29 |...TextS|ize (12)|
|00004220| 3b 0d 09 0d 09 47 65 74 | 44 49 74 65 6d 20 28 70 |;....Get|DItem (p|
|00004230| 64 69 61 6c 6f 67 2c 20 | 69 74 65 6d 6e 75 6d 62 |dialog, |itemnumb|
|00004240| 65 72 2c 20 26 69 74 65 | 6d 74 79 70 65 2c 20 26 |er, &ite|mtype, &|
|00004250| 69 74 65 6d 68 61 6e 64 | 6c 65 2c 20 26 69 74 65 |itemhand|le, &ite|
|00004260| 6d 72 65 63 74 29 3b 20 | 2f 2a 67 65 74 20 74 68 |mrect); |/*get th|
|00004270| 65 20 69 74 65 6d d5 73 | 20 72 65 63 74 2a 2f 0d |e item.s| rect*/.|
|00004280| 09 0d 09 72 20 3d 20 69 | 74 65 6d 72 65 63 74 3b |...r = i|temrect;|
|00004290| 0d 09 0d 09 49 6e 73 65 | 74 52 65 63 74 20 28 26 |....Inse|tRect (&|
|000042a0| 72 2c 20 33 2c 20 33 29 | 3b 0d 09 0d 09 54 65 78 |r, 3, 3)|;....Tex|
|000042b0| 74 42 6f 78 20 28 2a 68 | 74 65 78 74 2c 20 47 65 |tBox (*h|text, Ge|
|000042c0| 74 48 61 6e 64 6c 65 53 | 69 7a 65 20 28 68 74 65 |tHandleS|ize (hte|
|000042d0| 78 74 29 2c 20 26 72 2c | 20 30 29 3b 0d 09 0d 09 |xt), &r,| 0);....|
|000042e0| 54 65 78 74 46 6f 6e 74 | 20 28 73 61 76 65 64 66 |TextFont| (savedf|
|000042f0| 6f 6e 74 29 3b 0d 09 0d | 09 54 65 78 74 53 69 7a |ont);...|.TextSiz|
|00004300| 65 20 28 73 61 76 65 64 | 73 69 7a 65 29 3b 0d 09 |e (saved|size);..|
|00004310| 0d 09 47 65 74 50 65 6e | 53 74 61 74 65 20 28 26 |..GetPen|State (&|
|00004320| 73 61 76 65 64 70 65 6e | 29 3b 20 2f 2a 73 61 76 |savedpen|); /*sav|
|00004330| 65 20 74 68 65 20 6f 6c | 64 20 70 65 6e 20 73 74 |e the ol|d pen st|
|00004340| 61 74 65 2a 2f 0d 09 0d | 09 50 65 6e 50 61 74 20 |ate*/...|.PenPat |
|00004350| 28 67 72 61 79 29 3b 0d | 09 0d 09 46 72 61 6d 65 |(gray);.|...Frame|
|00004360| 52 65 63 74 20 28 26 69 | 74 65 6d 72 65 63 74 29 |Rect (&i|temrect)|
|00004370| 3b 0d 09 0d 09 53 65 74 | 50 65 6e 53 74 61 74 65 |;....Set|PenState|
|00004380| 20 28 26 73 61 76 65 64 | 70 65 6e 29 3b 0d 09 7d | (&saved|pen);..}|
|00004390| 20 2f 2a 64 72 61 77 69 | 74 65 6d 74 65 78 74 2a | /*drawi|temtext*|
|000043a0| 2f 0d 09 0d 0d 73 74 61 | 74 69 63 20 76 6f 69 64 |/....sta|tic void|
|000043b0| 20 64 72 61 77 69 74 65 | 6d 73 74 72 69 6e 67 20 | drawite|mstring |
|000043c0| 28 44 69 61 6c 6f 67 50 | 74 72 20 70 64 69 61 6c |(DialogP|tr pdial|
|000043d0| 6f 67 2c 20 73 68 6f 72 | 74 20 69 74 65 6d 6e 75 |og, shor|t itemnu|
|000043e0| 6d 62 65 72 2c 20 53 74 | 72 32 35 35 20 73 29 20 |mber, St|r255 s) |
|000043f0| 7b 0d 0d 09 73 68 6f 72 | 74 20 69 74 65 6d 74 79 |{...shor|t itemty|
|00004400| 70 65 3b 0d 09 48 61 6e | 64 6c 65 20 69 74 65 6d |pe;..Han|dle item|
|00004410| 68 61 6e 64 6c 65 3b 0d | 09 52 65 63 74 20 69 74 |handle;.|.Rect it|
|00004420| 65 6d 72 65 63 74 3b 0d | 09 73 68 6f 72 74 20 73 |emrect;.|.short s|
|00004430| 61 76 65 64 66 6f 6e 74 | 2c 20 73 61 76 65 64 73 |avedfont|, saveds|
|00004440| 69 7a 65 2c 20 73 61 76 | 65 64 73 74 79 6c 65 3b |ize, sav|edstyle;|
|00004450| 0d 09 52 65 63 74 20 72 | 3b 0d 09 50 65 6e 53 74 |..Rect r|;..PenSt|
|00004460| 61 74 65 20 73 61 76 65 | 64 70 65 6e 3b 0d 09 46 |ate save|dpen;..F|
|00004470| 6f 6e 74 49 6e 66 6f 20 | 69 6e 66 6f 3b 0d 09 52 |ontInfo |info;..R|
|00004480| 67 6e 48 61 6e 64 6c 65 | 20 72 67 6e 3b 0d 09 09 |gnHandle| rgn;...|
|00004490| 0d 09 73 61 76 65 64 66 | 6f 6e 74 20 3d 20 28 2a |..savedf|ont = (*|
|000044a0| 74 68 65 50 6f 72 74 29 | 2e 74 78 46 6f 6e 74 3b |thePort)|.txFont;|
|000044b0| 0d 09 0d 09 73 61 76 65 | 64 73 69 7a 65 20 3d 20 |....save|dsize = |
|000044c0| 28 2a 74 68 65 50 6f 72 | 74 29 2e 74 78 53 69 7a |(*thePor|t).txSiz|
|000044d0| 65 3b 0d 09 0d 09 73 61 | 76 65 64 73 74 79 6c 65 |e;....sa|vedstyle|
|000044e0| 20 3d 20 28 2a 74 68 65 | 50 6f 72 74 29 2e 74 78 | = (*the|Port).tx|
|000044f0| 46 61 63 65 3b 0d 09 0d | 09 54 65 78 74 46 6f 6e |Face;...|.TextFon|
|00004500| 74 20 28 68 65 6c 76 65 | 74 69 63 61 29 3b 0d 09 |t (helve|tica);..|
|00004510| 0d 09 54 65 78 74 53 69 | 7a 65 20 28 31 38 29 3b |..TextSi|ze (18);|
|00004520| 0d 09 0d 09 54 65 78 74 | 46 61 63 65 20 28 62 6f |....Text|Face (bo|
|00004530| 6c 64 29 3b 0d 09 0d 09 | 47 65 74 44 49 74 65 6d |ld);....|GetDItem|
|00004540| 20 28 70 64 69 61 6c 6f | 67 2c 20 69 74 65 6d 6e | (pdialo|g, itemn|
|00004550| 75 6d 62 65 72 2c 20 26 | 69 74 65 6d 74 79 70 65 |umber, &|itemtype|
|00004560| 2c 20 26 69 74 65 6d 68 | 61 6e 64 6c 65 2c 20 26 |, &itemh|andle, &|
|00004570| 69 74 65 6d 72 65 63 74 | 29 3b 20 2f 2a 67 65 74 |itemrect|); /*get|
|00004580| 20 74 68 65 20 69 74 65 | 6d d5 73 20 72 65 63 74 | the ite|m.s rect|
|00004590| 2a 2f 0d 09 0d 09 72 20 | 3d 20 69 74 65 6d 72 65 |*/....r |= itemre|
|000045a0| 63 74 3b 0d 09 0d 09 2f | 2a 49 6e 73 65 74 52 65 |ct;..../|*InsetRe|
|000045b0| 63 74 20 28 26 72 2c 20 | 33 2c 20 33 29 3b 2a 2f |ct (&r, |3, 3);*/|
|000045c0| 0d 09 0d 09 47 65 74 46 | 6f 6e 74 49 6e 66 6f 20 |....GetF|ontInfo |
|000045d0| 28 26 69 6e 66 6f 29 3b | 0d 09 0d 09 4d 6f 76 65 |(&info);|....Move|
|000045e0| 54 6f 20 28 72 2e 6c 65 | 66 74 2c 20 72 2e 62 6f |To (r.le|ft, r.bo|
|000045f0| 74 74 6f 6d 20 2d 20 69 | 6e 66 6f 2e 64 65 73 63 |ttom - i|nfo.desc|
|00004600| 65 6e 74 29 3b 0d 09 0d | 09 47 65 74 43 6c 69 70 |ent);...|.GetClip|
|00004610| 20 28 72 67 6e 20 3d 20 | 4e 65 77 52 67 6e 20 28 | (rgn = |NewRgn (|
|00004620| 29 29 3b 0d 09 0d 09 43 | 6c 69 70 52 65 63 74 20 |));....C|lipRect |
|00004630| 28 26 72 29 3b 0d 09 0d | 09 44 72 61 77 53 74 72 |(&r);...|.DrawStr|
|00004640| 69 6e 67 20 28 73 29 3b | 0d 09 0d 09 53 65 74 43 |ing (s);|....SetC|
|00004650| 6c 69 70 20 28 72 67 6e | 29 3b 0d 09 0d 09 44 69 |lip (rgn|);....Di|
|00004660| 73 70 6f 73 65 52 67 6e | 20 28 72 67 6e 29 3b 0d |sposeRgn| (rgn);.|
|00004670| 09 0d 09 54 65 78 74 46 | 6f 6e 74 20 28 73 61 76 |...TextF|ont (sav|
|00004680| 65 64 66 6f 6e 74 29 3b | 0d 09 0d 09 54 65 78 74 |edfont);|....Text|
|00004690| 53 69 7a 65 20 28 73 61 | 76 65 64 73 69 7a 65 29 |Size (sa|vedsize)|
|000046a0| 3b 0d 09 0d 09 54 65 78 | 74 46 61 63 65 20 28 73 |;....Tex|tFace (s|
|000046b0| 61 76 65 64 73 74 79 6c | 65 29 3b 0d 09 0d 09 47 |avedstyl|e);....G|
|000046c0| 65 74 50 65 6e 53 74 61 | 74 65 20 28 26 73 61 76 |etPenSta|te (&sav|
|000046d0| 65 64 70 65 6e 29 3b 20 | 2f 2a 73 61 76 65 20 74 |edpen); |/*save t|
|000046e0| 68 65 20 6f 6c 64 20 70 | 65 6e 20 73 74 61 74 65 |he old p|en state|
|000046f0| 2a 2f 0d 09 0d 09 50 65 | 6e 50 61 74 20 28 67 72 |*/....Pe|nPat (gr|
|00004700| 61 79 29 3b 0d 09 0d 09 | 2f 2a 46 72 61 6d 65 52 |ay);....|/*FrameR|
|00004710| 65 63 74 20 28 26 69 74 | 65 6d 72 65 63 74 29 3b |ect (&it|emrect);|
|00004720| 2a 2f 0d 09 0d 09 53 65 | 74 50 65 6e 53 74 61 74 |*/....Se|tPenStat|
|00004730| 65 20 28 26 73 61 76 65 | 64 70 65 6e 29 3b 0d 09 |e (&save|dpen);..|
|00004740| 7d 20 2f 2a 64 72 61 77 | 69 74 65 6d 73 74 72 69 |} /*draw|itemstri|
|00004750| 6e 67 2a 2f 0d 09 0d 0d | 70 61 73 63 61 6c 20 4f |ng*/....|pascal O|
|00004760| 53 45 72 72 20 50 6c 6f | 74 49 63 6f 6e 49 44 20 |SErr Plo|tIconID |
|00004770| 28 52 65 63 74 20 2a 72 | 2c 20 73 68 6f 72 74 20 |(Rect *r|, short |
|00004780| 61 6c 69 67 6e 2c 20 73 | 68 6f 72 74 20 74 72 61 |align, s|hort tra|
|00004790| 6e 73 66 6f 72 6d 2c 20 | 73 68 6f 72 74 20 72 65 |nsform, |short re|
|000047a0| 73 69 64 29 20 3d 20 7b | 30 78 33 30 33 43 2c 30 |sid) = {|0x303C,0|
|000047b0| 78 30 35 30 30 2c 30 78 | 41 42 43 39 7d 3b 0d 0d |x0500,0x|ABC9};..|
|000047c0| 0d 73 74 61 74 69 63 20 | 76 6f 69 64 20 64 72 61 |.static |void dra|
|000047d0| 77 69 74 65 6d 69 63 6f | 6e 20 28 44 69 61 6c 6f |witemico|n (Dialo|
|000047e0| 67 50 74 72 20 70 64 69 | 61 6c 6f 67 2c 20 73 68 |gPtr pdi|alog, sh|
|000047f0| 6f 72 74 20 69 74 65 6d | 6e 75 6d 62 65 72 2c 20 |ort item|number, |
|00004800| 73 68 6f 72 74 20 72 65 | 73 69 64 29 20 7b 0d 0d |short re|sid) {..|
|00004810| 09 73 68 6f 72 74 20 69 | 74 65 6d 74 79 70 65 3b |.short i|temtype;|
|00004820| 0d 09 48 61 6e 64 6c 65 | 20 69 74 65 6d 68 61 6e |..Handle| itemhan|
|00004830| 64 6c 65 3b 0d 09 52 65 | 63 74 20 69 74 65 6d 72 |dle;..Re|ct itemr|
|00004840| 65 63 74 3b 0d 09 09 0d | 09 47 65 74 44 49 74 65 |ect;....|.GetDIte|
|00004850| 6d 20 28 70 64 69 61 6c | 6f 67 2c 20 69 74 65 6d |m (pdial|og, item|
|00004860| 6e 75 6d 62 65 72 2c 20 | 26 69 74 65 6d 74 79 70 |number, |&itemtyp|
|00004870| 65 2c 20 26 69 74 65 6d | 68 61 6e 64 6c 65 2c 20 |e, &item|handle, |
|00004880| 26 69 74 65 6d 72 65 63 | 74 29 3b 20 2f 2a 67 65 |&itemrec|t); /*ge|
|00004890| 74 20 74 68 65 20 69 74 | 65 6d d5 73 20 72 65 63 |t the it|em.s rec|
|000048a0| 74 2a 2f 0d 09 0d 09 50 | 6c 6f 74 49 63 6f 6e 49 |t*/....P|lotIconI|
|000048b0| 44 20 28 26 69 74 65 6d | 72 65 63 74 2c 20 30 2c |D (&item|rect, 0,|
|000048c0| 20 30 2c 20 72 65 73 69 | 64 29 3b 0d 09 7d 20 2f | 0, resi|d);..} /|
|000048d0| 2a 64 72 61 77 69 74 65 | 6d 69 63 6f 6e 2a 2f 0d |*drawite|micon*/.|
|000048e0| 09 0d 09 0d 73 74 61 74 | 69 63 20 76 6f 69 64 20 |....stat|ic void |
|000048f0| 67 72 61 79 72 65 63 74 | 20 28 52 65 63 74 20 72 |grayrect| (Rect r|
|00004900| 29 20 7b 0d 0d 09 50 65 | 6e 53 74 61 74 65 20 73 |) {...Pe|nState s|
|00004910| 61 76 65 64 70 65 6e 3b | 0d 09 0d 09 47 65 74 50 |avedpen;|....GetP|
|00004920| 65 6e 53 74 61 74 65 20 | 28 26 73 61 76 65 64 70 |enState |(&savedp|
|00004930| 65 6e 29 3b 20 2f 2a 73 | 61 76 65 20 74 68 65 20 |en); /*s|ave the |
|00004940| 6f 6c 64 20 70 65 6e 20 | 73 74 61 74 65 2a 2f 0d |old pen |state*/.|
|00004950| 09 0d 09 50 65 6e 4d 6f | 64 65 20 28 70 61 74 42 |...PenMo|de (patB|
|00004960| 69 63 29 3b 0d 09 0d 09 | 50 65 6e 50 61 74 20 28 |ic);....|PenPat (|
|00004970| 67 72 61 79 29 3b 0d 09 | 0d 09 50 61 69 6e 74 52 |gray);..|..PaintR|
|00004980| 65 63 74 20 28 26 72 29 | 3b 0d 09 0d 09 53 65 74 |ect (&r)|;....Set|
|00004990| 50 65 6e 53 74 61 74 65 | 20 28 26 73 61 76 65 64 |PenState| (&saved|
|000049a0| 70 65 6e 29 3b 0d 09 7d | 20 2f 2a 67 72 61 79 72 |pen);..}| /*grayr|
|000049b0| 65 63 74 2a 2f 0d 09 0d | 0d 73 74 61 74 69 63 20 |ect*/...|.static |
|000049c0| 76 6f 69 64 20 64 69 73 | 61 62 6c 65 64 69 61 6c |void dis|abledial|
|000049d0| 6f 67 69 74 65 6d 20 28 | 44 69 61 6c 6f 67 50 74 |ogitem (|DialogPt|
|000049e0| 72 20 70 64 69 61 6c 6f | 67 2c 20 73 68 6f 72 74 |r pdialo|g, short|
|000049f0| 20 69 74 65 6d 6e 75 6d | 62 65 72 29 20 7b 0d 09 | itemnum|ber) {..|
|00004a00| 0d 09 73 68 6f 72 74 20 | 69 74 65 6d 74 79 70 65 |..short |itemtype|
|00004a10| 3b 0d 09 48 61 6e 64 6c | 65 20 69 74 65 6d 68 61 |;..Handl|e itemha|
|00004a20| 6e 64 6c 65 3b 0d 09 52 | 65 63 74 20 69 74 65 6d |ndle;..R|ect item|
|00004a30| 72 65 63 74 3b 0d 0d 09 | 47 65 74 44 49 74 65 6d |rect;...|GetDItem|
|00004a40| 20 28 70 64 69 61 6c 6f | 67 2c 20 69 74 65 6d 6e | (pdialo|g, itemn|
|00004a50| 75 6d 62 65 72 2c 20 26 | 69 74 65 6d 74 79 70 65 |umber, &|itemtype|
|00004a60| 2c 20 26 69 74 65 6d 68 | 61 6e 64 6c 65 2c 20 26 |, &itemh|andle, &|
|00004a70| 69 74 65 6d 72 65 63 74 | 29 3b 0d 09 0d 09 69 66 |itemrect|);....if|
|00004a80| 20 28 69 74 65 6d 74 79 | 70 65 20 3c 20 69 74 65 | (itemty|pe < ite|
|00004a90| 6d 44 69 73 61 62 6c 65 | 29 20 7b 20 2f 2a 69 74 |mDisable|) { /*it|
|00004aa0| 20 69 73 20 65 6e 61 62 | 6c 65 64 2c 20 64 69 73 | is enab|led, dis|
|00004ab0| 61 62 6c 65 20 69 74 2a | 2f 0d 09 0d 09 09 53 65 |able it*|/.....Se|
|00004ac0| 74 44 49 74 65 6d 20 28 | 70 64 69 61 6c 6f 67 2c |tDItem (|pdialog,|
|00004ad0| 20 69 74 65 6d 6e 75 6d | 62 65 72 2c 20 69 74 65 | itemnum|ber, ite|
|00004ae0| 6d 74 79 70 65 20 2b 20 | 69 74 65 6d 44 69 73 61 |mtype + |itemDisa|
|00004af0| 62 6c 65 2c 20 69 74 65 | 6d 68 61 6e 64 6c 65 2c |ble, ite|mhandle,|
|00004b00| 20 26 69 74 65 6d 72 65 | 63 74 29 3b 0d 09 09 7d | &itemre|ct);...}|
|00004b10| 0d 09 0d 09 67 72 61 79 | 72 65 63 74 20 28 69 74 |....gray|rect (it|
|00004b20| 65 6d 72 65 63 74 29 3b | 0d 09 7d 20 2f 2a 64 69 |emrect);|..} /*di|
|00004b30| 73 61 62 6c 65 64 69 61 | 6c 6f 67 69 74 65 6d 2a |sabledia|logitem*|
|00004b40| 2f 0d 09 0d 0d 73 74 61 | 74 69 63 20 76 6f 69 64 |/....sta|tic void|
|00004b50| 20 68 61 6e 64 6c 65 64 | 72 61 67 20 28 45 76 65 | handled|rag (Eve|
|00004b60| 6e 74 52 65 63 6f 72 64 | 20 2a 65 76 2c 20 57 69 |ntRecord| *ev, Wi|
|00004b70| 6e 64 6f 77 50 74 72 20 | 77 29 20 7b 0d 09 0d 09 |ndowPtr |w) {....|
|00004b80| 52 65 63 74 20 72 3b 0d | 0d 09 72 20 3d 20 71 64 |Rect r;.|..r = qd|
|00004b90| 2e 73 63 72 65 65 6e 42 | 69 74 73 2e 62 6f 75 6e |.screenB|its.boun|
|00004ba0| 64 73 3b 20 0d 09 0d 09 | 72 2e 74 6f 70 20 3d 20 |ds; ....|r.top = |
|00004bb0| 72 2e 74 6f 70 20 2b 20 | 47 65 74 4d 42 61 72 48 |r.top + |GetMBarH|
|00004bc0| 65 69 67 68 74 20 28 29 | 3b 20 0d 09 0d 09 49 6e |eight ()|; ....In|
|00004bd0| 73 65 74 52 65 63 74 20 | 28 26 72 2c 20 34 2c 20 |setRect |(&r, 4, |
|00004be0| 34 29 3b 0d 09 0d 09 44 | 72 61 67 57 69 6e 64 6f |4);....D|ragWindo|
|00004bf0| 77 20 28 77 2c 20 28 2a | 65 76 29 2e 77 68 65 72 |w (w, (*|ev).wher|
|00004c00| 65 2c 20 26 72 29 3b 0d | 09 7d 20 2f 2a 68 61 6e |e, &r);.|.} /*han|
|00004c10| 64 6c 65 64 72 61 67 2a | 2f 0d 0d 0d 73 74 61 74 |dledrag*|/...stat|
|00004c20| 69 63 20 76 6f 69 64 20 | 68 61 6e 64 6c 65 6d 65 |ic void |handleme|
|00004c30| 6e 75 20 28 6c 6f 6e 67 | 20 63 6f 64 65 77 6f 72 |nu (long| codewor|
|00004c40| 64 29 20 7b 0d 09 0d 09 | 72 65 67 69 73 74 65 72 |d) {....|register|
|00004c50| 20 73 68 6f 72 74 20 69 | 64 6d 65 6e 75 2c 20 69 | short i|dmenu, i|
|00004c60| 64 69 74 65 6d 3b 0d 09 | 0d 09 69 64 69 74 65 6d |ditem;..|..iditem|
|00004c70| 20 3d 20 4c 6f 57 6f 72 | 64 20 28 63 6f 64 65 77 | = LoWor|d (codew|
|00004c80| 6f 72 64 29 3b 0d 09 0d | 09 69 64 6d 65 6e 75 20 |ord);...|.idmenu |
|00004c90| 3d 20 48 69 57 6f 72 64 | 20 28 63 6f 64 65 77 6f |= HiWord| (codewo|
|00004ca0| 72 64 29 3b 0d 09 0d 09 | 69 66 20 28 53 68 61 72 |rd);....|if (Shar|
|00004cb0| 65 64 4d 65 6e 75 48 69 | 74 20 28 69 64 6d 65 6e |edMenuHi|t (idmen|
|00004cc0| 75 2c 20 69 64 69 74 65 | 6d 29 29 20 2f 2a 53 65 |u, idite|m)) /*Se|
|00004cd0| 65 20 53 74 65 70 20 23 | 33 2a 2f 09 0d 09 09 67 |e Step #|3*/....g|
|00004ce0| 6f 74 6f 20 65 78 69 74 | 3b 0d 09 0d 09 73 77 69 |oto exit|;....swi|
|00004cf0| 74 63 68 20 28 69 64 6d | 65 6e 75 29 20 7b 0d 09 |tch (idm|enu) {..|
|00004d00| 0d 09 09 63 61 73 65 20 | 61 70 70 6c 65 6d 65 6e |...case |applemen|
|00004d10| 75 3a 20 0d 09 09 09 73 | 77 69 74 63 68 20 28 69 |u: ....s|witch (i|
|00004d20| 64 69 74 65 6d 29 20 7b | 0d 09 09 09 09 0d 09 09 |ditem) {|........|
|00004d30| 09 09 63 61 73 65 20 61 | 62 6f 75 74 69 74 65 6d |..case a|boutitem|
|00004d40| 3a 0d 09 09 09 09 09 6e | 6f 74 69 66 79 75 73 65 |:......n|otifyuse|
|00004d50| 72 20 28 2a 47 65 74 53 | 74 72 69 6e 67 20 28 31 |r (*GetS|tring (1|
|00004d60| 33 30 29 29 3b 0d 09 09 | 09 09 09 0d 09 09 09 09 |30));...|........|
|00004d70| 09 62 72 65 61 6b 3b 0d | 09 09 09 0d 09 09 09 09 |.break;.|........|
|00004d80| 64 65 66 61 75 6c 74 3a | 20 7b 0d 09 09 09 09 0d |default:| {......|
|00004d90| 09 09 09 09 09 53 74 72 | 32 35 35 20 73 3b 0d 09 |.....Str|255 s;..|
|00004da0| 09 09 09 09 0d 09 09 09 | 09 09 47 65 74 49 74 65 |........|..GetIte|
|00004db0| 6d 20 28 68 61 70 70 6c | 65 6d 65 6e 75 2c 20 69 |m (happl|emenu, i|
|00004dc0| 64 69 74 65 6d 2c 20 73 | 29 3b 0d 09 09 09 09 09 |ditem, s|);......|
|00004dd0| 0d 09 09 09 09 09 4f 70 | 65 6e 44 65 73 6b 41 63 |......Op|enDeskAc|
|00004de0| 63 20 28 73 29 3b 0d 09 | 09 09 09 09 0d 09 09 09 |c (s);..|........|
|00004df0| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 09 09 7d 0d |..break;|......}.|
|00004e00| 09 09 09 09 7d 20 2f 2a | 73 77 69 74 63 68 2a 2f |....} /*|switch*/|
|00004e10| 0d 09 09 09 0d 09 09 09 | 62 72 65 61 6b 3b 20 2f |........|break; /|
|00004e20| 2a 61 70 70 6c 65 20 6d | 65 6e 75 2a 2f 0d 0d 09 |*apple m|enu*/...|
|00004e30| 09 63 61 73 65 20 66 69 | 6c 65 6d 65 6e 75 3a 20 |.case fi|lemenu: |
|00004e40| 0d 09 09 09 73 77 69 74 | 63 68 20 28 69 64 69 74 |....swit|ch (idit|
|00004e50| 65 6d 29 20 7b 0d 09 09 | 09 09 0d 09 09 09 09 63 |em) {...|.......c|
|00004e60| 61 73 65 20 71 75 69 74 | 69 74 65 6d 3a 0d 09 09 |ase quit|item:...|
|00004e70| 09 09 0d 09 09 09 09 09 | 66 6c 65 78 69 74 6d 61 |........|flexitma|
|00004e80| 69 6e 6c 6f 6f 70 20 3d | 20 74 72 75 65 3b 0d 09 |inloop =| true;..|
|00004e90| 09 09 09 09 0d 09 09 09 | 09 09 62 72 65 61 6b 3b |........|..break;|
|00004ea0| 0d 09 09 09 09 7d 20 2f | 2a 73 77 69 74 63 68 2a |.....} /|*switch*|
|00004eb0| 2f 0d 09 09 09 0d 09 09 | 09 62 72 65 61 6b 3b 20 |/.......|.break; |
|00004ec0| 2f 2a 66 69 6c 65 20 6d | 65 6e 75 2a 2f 0d 09 09 |/*file m|enu*/...|
|00004ed0| 09 0d 09 09 7d 20 2f 2a | 73 77 69 74 63 68 69 6e |....} /*|switchin|
|00004ee0| 67 20 6f 6e 20 77 68 69 | 63 68 20 6d 65 6e 75 20 |g on whi|ch menu |
|00004ef0| 77 61 73 20 69 6e 76 6f | 6b 65 64 2a 2f 0d 09 09 |was invo|ked*/...|
|00004f00| 0d 09 65 78 69 74 3a 0d | 09 0d 09 48 69 6c 69 74 |..exit:.|...Hilit|
|00004f10| 65 4d 65 6e 75 20 28 30 | 29 3b 0d 09 7d 20 2f 2a |eMenu (0|);..} /*|
|00004f20| 68 61 6e 64 6c 65 6d 65 | 6e 75 2a 2f 0d 0d 0d 73 |handleme|nu*/...s|
|00004f30| 74 61 74 69 63 20 76 6f | 69 64 20 68 61 6e 64 6c |tatic vo|id handl|
|00004f40| 65 6d 6f 75 73 65 20 28 | 45 76 65 6e 74 52 65 63 |emouse (|EventRec|
|00004f50| 6f 72 64 20 2a 65 76 29 | 20 7b 0d 0d 09 72 65 67 |ord *ev)| {...reg|
|00004f60| 69 73 74 65 72 20 73 68 | 6f 72 74 20 70 61 72 74 |ister sh|ort part|
|00004f70| 3b 0d 09 57 69 6e 64 6f | 77 50 74 72 20 77 3b 0d |;..Windo|wPtr w;.|
|00004f80| 09 0d 09 70 61 72 74 20 | 3d 20 46 69 6e 64 57 69 |...part |= FindWi|
|00004f90| 6e 64 6f 77 20 28 28 2a | 65 76 29 2e 77 68 65 72 |ndow ((*|ev).wher|
|00004fa0| 65 2c 20 26 77 29 3b 0d | 09 0d 09 69 66 20 28 77 |e, &w);.|...if (w|
|00004fb0| 20 21 3d 20 6e 69 6c 29 | 20 0d 09 0d 09 09 69 66 | != nil)| .....if|
|00004fc0| 20 28 77 20 21 3d 20 46 | 72 6f 6e 74 57 69 6e 64 | (w != F|rontWind|
|00004fd0| 6f 77 20 28 29 29 20 7b | 20 2f 2a 6a 75 73 74 20 |ow ()) {| /*just |
|00004fe0| 6c 69 6b 65 20 61 6c 6c | 20 6f 74 68 65 72 20 4d |like all| other M|
|00004ff0| 61 63 20 70 72 6f 67 72 | 61 6d 73 2a 2f 0d 09 09 |ac progr|ams*/...|
|00005000| 09 0d 09 09 09 53 65 6c | 65 63 74 57 69 6e 64 6f |.....Sel|ectWindo|
|00005010| 77 20 28 77 29 3b 0d 09 | 09 09 09 09 09 09 0d 09 |w (w);..|........|
|00005020| 09 09 72 65 74 75 72 6e | 3b 20 2f 2a 74 68 65 20 |..return|; /*the |
|00005030| 6d 6f 75 73 65 20 63 6c | 69 63 6b 20 69 73 20 63 |mouse cl|ick is c|
|00005040| 6f 6e 73 75 6d 65 64 20 | 62 79 20 74 68 65 20 62 |onsumed |by the b|
|00005050| 72 69 6e 67 74 6f 66 72 | 6f 6e 74 20 6f 70 65 72 |ringtofr|ont oper|
|00005060| 61 74 69 6f 6e 2a 2f 0d | 09 09 09 7d 0d 09 0d 09 |ation*/.|...}....|
|00005070| 73 77 69 74 63 68 20 28 | 70 61 72 74 29 20 7b 0d |switch (|part) {.|
|00005080| 09 0d 09 09 63 61 73 65 | 20 69 6e 4d 65 6e 75 42 |....case| inMenuB|
|00005090| 61 72 3a 20 0d 09 09 09 | 68 61 6e 64 6c 65 6d 65 |ar: ....|handleme|
|000050a0| 6e 75 20 28 4d 65 6e 75 | 53 65 6c 65 63 74 20 28 |nu (Menu|Select (|
|000050b0| 28 2a 65 76 29 2e 77 68 | 65 72 65 29 29 3b 20 0d |(*ev).wh|ere)); .|
|000050c0| 09 09 09 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |.......b|reak;...|
|000050d0| 0d 09 09 63 61 73 65 20 | 69 6e 53 79 73 57 69 6e |...case |inSysWin|
|000050e0| 64 6f 77 3a 0d 09 09 09 | 53 79 73 74 65 6d 43 6c |dow:....|SystemCl|
|000050f0| 69 63 6b 20 28 65 76 2c | 20 77 29 3b 20 0d 09 09 |ick (ev,| w); ...|
|00005100| 09 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 0d 09 |.....bre|ak;.....|
|00005110| 09 63 61 73 65 20 69 6e | 44 72 61 67 3a 0d 09 09 |.case in|Drag:...|
|00005120| 09 68 61 6e 64 6c 65 64 | 72 61 67 20 28 65 76 2c |.handled|rag (ev,|
|00005130| 20 77 29 3b 0d 09 09 09 | 0d 09 09 09 62 72 65 61 | w);....|....brea|
|00005140| 6b 3b 0d 09 09 09 0d 09 | 09 7d 20 2f 2a 73 77 69 |k;......|.} /*swi|
|00005150| 74 63 68 2a 2f 0d 09 7d | 20 2f 2a 68 61 6e 64 6c |tch*/..}| /*handl|
|00005160| 65 6d 6f 75 73 65 2a 2f | 0d 09 0d 09 0d 73 74 61 |emouse*/|.....sta|
|00005170| 74 69 63 20 76 6f 69 64 | 20 68 69 67 68 6c 69 67 |tic void| highlig|
|00005180| 68 74 62 75 74 74 6f 6e | 20 28 73 68 6f 72 74 20 |htbutton| (short |
|00005190| 69 74 65 6d 6e 75 6d 62 | 65 72 2c 20 42 6f 6f 6c |itemnumb|er, Bool|
|000051a0| 65 61 6e 20 66 6c 6f 6e | 29 20 7b 0d 09 0d 09 73 |ean flon|) {....s|
|000051b0| 68 6f 72 74 20 78 3b 0d | 09 73 68 6f 72 74 20 69 |hort x;.|.short i|
|000051c0| 74 65 6d 74 79 70 65 3b | 0d 09 48 61 6e 64 6c 65 |temtype;|..Handle|
|000051d0| 20 69 74 65 6d 68 61 6e | 64 6c 65 3b 0d 09 52 65 | itemhan|dle;..Re|
|000051e0| 63 74 20 69 74 65 6d 62 | 6f 78 3b 0d 09 0d 09 47 |ct itemb|ox;....G|
|000051f0| 65 74 44 49 74 65 6d 20 | 28 77 2c 20 69 74 65 6d |etDItem |(w, item|
|00005200| 6e 75 6d 62 65 72 2c 20 | 26 69 74 65 6d 74 79 70 |number, |&itemtyp|
|00005210| 65 2c 20 26 69 74 65 6d | 68 61 6e 64 6c 65 2c 20 |e, &item|handle, |
|00005220| 26 69 74 65 6d 62 6f 78 | 29 3b 0d 09 0d 09 69 66 |&itembox|);....if|
|00005230| 20 28 66 6c 6f 6e 29 0d | 09 09 78 20 3d 20 69 6e | (flon).|..x = in|
|00005240| 42 75 74 74 6f 6e 3b 0d | 09 65 6c 73 65 0d 09 09 |Button;.|.else...|
|00005250| 78 20 3d 20 30 3b 0d 09 | 0d 09 48 69 6c 69 74 65 |x = 0;..|..Hilite|
|00005260| 43 6f 6e 74 72 6f 6c 20 | 28 28 43 6f 6e 74 72 6f |Control |((Contro|
|00005270| 6c 48 61 6e 64 6c 65 29 | 20 69 74 65 6d 68 61 6e |lHandle)| itemhan|
|00005280| 64 6c 65 2c 20 78 29 3b | 20 0d 09 7d 20 2f 2a 68 |dle, x);| ..} /*h|
|00005290| 69 67 68 6c 69 67 68 74 | 62 75 74 74 6f 6e 2a 2f |ighlight|button*/|
|000052a0| 0d 0d 0d 73 74 61 74 69 | 63 20 76 6f 69 64 20 64 |...stati|c void d|
|000052b0| 65 6c 61 79 74 69 63 6b | 73 20 28 73 68 6f 72 74 |elaytick|s (short|
|000052c0| 20 63 74 29 20 7b 0d 09 | 0d 09 6c 6f 6e 67 20 74 | ct) {..|..long t|
|000052d0| 63 3b 0d 09 0d 09 74 63 | 20 3d 20 54 69 63 6b 43 |c;....tc| = TickC|
|000052e0| 6f 75 6e 74 20 28 29 20 | 2b 20 63 74 3b 0d 09 0d |ount () |+ ct;...|
|000052f0| 09 77 68 69 6c 65 20 28 | 54 69 63 6b 43 6f 75 6e |.while (|TickCoun|
|00005300| 74 20 28 29 20 3c 20 74 | 63 29 20 7b 7d 0d 09 7d |t () < t|c) {}..}|
|00005310| 20 2f 2a 64 65 6c 61 79 | 74 69 63 6b 73 2a 2f 0d | /*delay|ticks*/.|
|00005320| 09 0d 09 0d 73 74 61 74 | 69 63 20 76 6f 69 64 20 |....stat|ic void |
|00005330| 73 69 6d 75 6c 61 74 65 | 68 69 74 20 28 73 68 6f |simulate|hit (sho|
|00005340| 72 74 20 69 74 65 6d 29 | 20 7b 0d 09 0d 09 68 69 |rt item)| {....hi|
|00005350| 67 68 6c 69 67 68 74 62 | 75 74 74 6f 6e 20 28 69 |ghlightb|utton (i|
|00005360| 74 65 6d 2c 20 74 72 75 | 65 29 3b 0d 09 0d 09 64 |tem, tru|e);....d|
|00005370| 65 6c 61 79 74 69 63 6b | 73 20 28 38 29 3b 0d 09 |elaytick|s (8);..|
|00005380| 0d 09 68 69 67 68 6c 69 | 67 68 74 62 75 74 74 6f |..highli|ghtbutto|
|00005390| 6e 20 28 69 74 65 6d 2c | 20 66 61 6c 73 65 29 3b |n (item,| false);|
|000053a0| 0d 09 7d 20 2f 2a 73 69 | 6d 75 6c 61 74 65 68 69 |..} /*si|mulatehi|
|000053b0| 74 2a 2f 0d 0d 0d 73 74 | 61 74 69 63 20 42 6f 6f |t*/...st|atic Boo|
|000053c0| 6c 65 61 6e 20 68 61 6e | 64 6c 65 6b 65 79 73 74 |lean han|dlekeyst|
|000053d0| 72 6f 6b 65 20 28 45 76 | 65 6e 74 52 65 63 6f 72 |roke (Ev|entRecor|
|000053e0| 64 20 2a 65 76 29 20 7b | 20 0d 0d 09 63 68 61 72 |d *ev) {| ...char|
|000053f0| 20 63 68 20 3d 20 28 2a | 65 76 29 2e 6d 65 73 73 | ch = (*|ev).mess|
|00005400| 61 67 65 20 26 20 63 68 | 61 72 43 6f 64 65 4d 61 |age & ch|arCodeMa|
|00005410| 73 6b 3b 0d 09 42 6f 6f | 6c 65 61 6e 20 66 6c 63 |sk;..Boo|lean flc|
|00005420| 6d 64 70 65 72 69 6f 64 | 20 3d 20 66 61 6c 73 65 |mdperiod| = false|
|00005430| 3b 0d 09 0d 09 69 66 20 | 28 53 68 61 72 65 64 53 |;....if |(SharedS|
|00005440| 63 72 69 70 74 52 75 6e | 6e 69 6e 67 20 28 29 29 |criptRun|ning ())|
|00005450| 20 7b 20 2f 2a 63 6d 64 | 2d 70 65 72 69 6f 64 20 | { /*cmd|-period |
|00005460| 74 65 72 6d 69 6e 61 74 | 65 73 20 74 68 65 20 73 |terminat|es the s|
|00005470| 63 72 69 70 74 2a 2f 0d | 09 0d 09 09 69 66 20 28 |cript*/.|....if (|
|00005480| 28 28 2a 65 76 29 2e 6d | 6f 64 69 66 69 65 72 73 |((*ev).m|odifiers|
|00005490| 20 26 20 63 6d 64 4b 65 | 79 29 20 26 26 20 28 63 | & cmdKe|y) && (c|
|000054a0| 68 20 3d 3d 20 27 2e 27 | 29 29 20 7b 20 0d 09 09 |h == '.'|)) { ...|
|000054b0| 09 0d 09 09 09 66 6c 63 | 6d 64 70 65 72 69 6f 64 |.....flc|mdperiod|
|000054c0| 20 3d 20 74 72 75 65 3b | 0d 09 09 09 0d 09 09 09 | = true;|........|
|000054d0| 43 61 6e 63 65 6c 53 68 | 61 72 65 64 53 63 72 69 |CancelSh|aredScri|
|000054e0| 70 74 20 28 29 3b 20 2f | 2a 63 61 6e 63 65 6c 20 |pt (); /|*cancel |
|000054f0| 74 68 65 20 73 68 61 72 | 65 64 20 6d 65 6e 75 20 |the shar|ed menu |
|00005500| 73 63 72 69 70 74 2c 20 | 69 66 20 6f 6e 65 20 69 |script, |if one i|
|00005510| 73 20 72 75 6e 6e 69 6e | 67 2a 2f 0d 09 09 0d 09 |s runnin|g*/.....|
|00005520| 09 09 72 65 74 75 72 6e | 20 28 74 72 75 65 29 3b |..return| (true);|
|00005530| 0d 09 09 09 7d 0d 09 09 | 7d 0d 09 0d 09 69 66 20 |....}...|}....if |
|00005540| 28 28 63 68 20 3d 3d 20 | 28 63 68 61 72 29 20 31 |((ch == |(char) 1|
|00005550| 33 29 20 7c 7c 20 28 63 | 68 20 3d 3d 20 28 63 68 |3) || (c|h == (ch|
|00005560| 61 72 29 20 33 29 20 7c | 7c 20 28 63 68 20 3d 3d |ar) 3) ||| (ch ==|
|00005570| 20 27 72 27 29 20 7c 7c | 20 28 63 68 20 3d 3d 20 | 'r') ||| (ch == |
|00005580| 27 52 27 29 29 20 7b 20 | 0d 09 09 0d 09 09 2f 2a |'R')) { |....../*|
|00005590| 75 73 65 72 20 68 69 74 | 20 52 65 74 75 72 6e 2c |user hit| Return,|
|000055a0| 20 45 6e 74 65 72 2c 20 | 72 20 6f 72 20 52 2a 2f | Enter, |r or R*/|
|000055b0| 0d 09 09 0d 09 09 69 66 | 20 28 66 6c 32 63 6c 69 |......if| (fl2cli|
|000055c0| 63 6b 29 20 2f 2a 52 75 | 6e 20 62 75 74 74 6f 6e |ck) /*Ru|n button|
|000055d0| 20 6e 6f 74 20 65 6e 61 | 62 6c 65 64 2a 2f 0d 09 | not ena|bled*/..|
|000055e0| 09 09 72 65 74 75 72 6e | 20 28 74 72 75 65 29 3b |..return| (true);|
|000055f0| 0d 09 09 0d 09 09 73 69 | 6d 75 6c 61 74 65 68 69 |......si|mulatehi|
|00005600| 74 20 28 72 75 6e 69 74 | 65 6d 29 3b 0d 09 0d 09 |t (runit|em);....|
|00005610| 09 44 69 73 70 6f 73 44 | 69 61 6c 6f 67 20 28 77 |.DisposD|ialog (w|
|00005620| 29 3b 0d 09 0d 09 09 77 | 20 3d 20 6e 69 6c 3b 0d |);.....w| = nil;.|
|00005630| 09 0d 09 09 64 6f 66 69 | 6c 65 6c 69 73 74 20 28 |....dofi|lelist (|
|00005640| 29 3b 0d 09 0d 09 09 72 | 65 74 75 72 6e 20 28 66 |);.....r|eturn (f|
|00005650| 61 6c 73 65 29 3b 0d 09 | 09 7d 0d 09 09 0d 09 69 |alse);..|.}.....i|
|00005660| 66 20 28 28 66 6c 63 6d | 64 70 65 72 69 6f 64 29 |f ((flcm|dperiod)|
|00005670| 20 7c 7c 20 28 28 63 68 | 20 3d 3d 20 27 71 27 29 | || ((ch| == 'q')|
|00005680| 20 7c 7c 20 28 63 68 20 | 3d 3d 20 27 51 27 29 29 | || (ch |== 'Q'))|
|00005690| 29 20 7b 20 2f 2a 63 6c | 6f 73 65 20 74 68 65 20 |) { /*cl|ose the |
|000056a0| 77 69 6e 64 6f 77 20 61 | 6e 64 20 65 78 69 74 2a |window a|nd exit*|
|000056b0| 2f 0d 09 0d 09 09 73 69 | 6d 75 6c 61 74 65 68 69 |/.....si|mulatehi|
|000056c0| 74 20 28 63 61 6e 63 65 | 6c 69 74 65 6d 29 3b 0d |t (cance|litem);.|
|000056d0| 09 09 0d 09 09 72 65 74 | 75 72 6e 20 28 66 61 6c |.....ret|urn (fal|
|000056e0| 73 65 29 3b 0d 09 09 7d | 0d 09 09 0d 09 69 66 20 |se);...}|.....if |
|000056f0| 28 28 63 68 20 3d 3d 20 | 27 65 27 29 20 7c 7c 20 |((ch == |'e') || |
|00005700| 28 63 68 20 3d 3d 20 27 | 45 27 29 29 20 7b 0d 09 |(ch == '|E')) {..|
|00005710| 09 0d 09 09 73 69 6d 75 | 6c 61 74 65 68 69 74 20 |....simu|latehit |
|00005720| 28 65 64 69 74 69 74 65 | 6d 29 3b 0d 09 09 0d 09 |(editite|m);.....|
|00005730| 09 64 6f 65 64 69 74 20 | 28 29 3b 0d 09 09 0d 09 |.doedit |();.....|
|00005740| 09 72 65 74 75 72 6e 20 | 28 74 72 75 65 29 3b 0d |.return |(true);.|
|00005750| 09 09 7d 0d 09 09 0d 09 | 68 61 6e 64 6c 65 6d 65 |..}.....|handleme|
|00005760| 6e 75 20 28 4d 65 6e 75 | 4b 65 79 20 28 63 68 29 |nu (Menu|Key (ch)|
|00005770| 29 3b 20 0d 09 0d 09 72 | 65 74 75 72 6e 20 28 74 |); ....r|eturn (t|
|00005780| 72 75 65 29 3b 0d 09 7d | 20 2f 2a 68 61 6e 64 6c |rue);..}| /*handl|
|00005790| 65 6b 65 79 73 74 72 6f | 6b 65 2a 2f 0d 0d 0d 73 |ekeystro|ke*/...s|
|000057a0| 74 61 74 69 63 20 76 6f | 69 64 20 69 6e 69 74 6d |tatic vo|id initm|
|000057b0| 65 6e 75 73 20 28 76 6f | 69 64 29 20 7b 0d 09 0d |enus (vo|id) {...|
|000057c0| 09 2f 2a 0d 09 73 65 74 | 20 75 70 20 6f 75 72 20 |./*..set| up our |
|000057d0| 61 70 70 6c 65 20 61 6e | 64 20 66 69 6c 65 20 6d |apple an|d file m|
|000057e0| 65 6e 75 73 2e 20 20 6e | 6f 74 68 69 6e 67 20 66 |enus. n|othing f|
|000057f0| 61 6e 63 79 2e 0d 09 2a | 2f 0d 09 0d 09 68 61 70 |ancy...*|/....hap|
|00005800| 70 6c 65 6d 65 6e 75 20 | 3d 20 47 65 74 4d 65 6e |plemenu |= GetMen|
|00005810| 75 20 28 61 70 70 6c 65 | 6d 65 6e 75 29 3b 20 0d |u (apple|menu); .|
|00005820| 09 0d 09 41 64 64 52 65 | 73 4d 65 6e 75 20 28 68 |...AddRe|sMenu (h|
|00005830| 61 70 70 6c 65 6d 65 6e | 75 2c 20 27 44 52 56 52 |applemen|u, 'DRVR|
|00005840| 27 29 3b 20 0d 09 0d 09 | 49 6e 73 65 72 74 4d 65 |'); ....|InsertMe|
|00005850| 6e 75 20 28 68 61 70 70 | 6c 65 6d 65 6e 75 2c 20 |nu (happ|lemenu, |
|00005860| 30 29 3b 20 0d 09 0d 09 | 68 66 69 6c 65 6d 65 6e |0); ....|hfilemen|
|00005870| 75 20 3d 20 47 65 74 4d | 65 6e 75 20 28 66 69 6c |u = GetM|enu (fil|
|00005880| 65 6d 65 6e 75 29 3b 20 | 0d 09 0d 09 49 6e 73 65 |emenu); |....Inse|
|00005890| 72 74 4d 65 6e 75 20 28 | 68 66 69 6c 65 6d 65 6e |rtMenu (|hfilemen|
|000058a0| 75 2c 20 30 29 3b 0d 09 | 0d 09 44 72 61 77 4d 65 |u, 0);..|..DrawMe|
|000058b0| 6e 75 42 61 72 20 28 29 | 3b 0d 09 7d 20 2f 2a 69 |nuBar ()|;..} /*i|
|000058c0| 6e 69 74 6d 65 6e 75 73 | 2a 2f 0d 0d 0d 73 74 61 |nitmenus|*/...sta|
|000058d0| 74 69 63 20 76 6f 69 64 | 20 6d 61 69 6e 65 76 65 |tic void| maineve|
|000058e0| 6e 74 6c 6f 6f 70 20 28 | 76 6f 69 64 29 20 7b 0d |ntloop (|void) {.|
|000058f0| 09 0d 09 48 61 6e 64 6c | 65 20 68 74 65 78 74 3b |...Handl|e htext;|
|00005900| 0d 09 45 76 65 6e 74 52 | 65 63 6f 72 64 20 65 76 |..EventR|ecord ev|
|00005910| 3b 0d 09 44 69 61 6c 6f | 67 50 74 72 20 70 64 69 |;..Dialo|gPtr pdi|
|00005920| 61 6c 6f 67 3b 0d 09 73 | 68 6f 72 74 20 69 74 65 |alog;..s|hort ite|
|00005930| 6d 68 69 74 3b 0d 09 42 | 6f 6f 6c 65 61 6e 20 66 |mhit;..B|oolean f|
|00005940| 6c 69 6e 73 74 61 6c 6c | 65 64 20 3d 20 66 61 6c |linstall|ed = fal|
|00005950| 73 65 3b 0d 09 53 74 72 | 32 35 35 20 74 69 74 6c |se;..Str|255 titl|
|00005960| 65 73 74 72 69 6e 67 3b | 0d 09 0d 09 69 6e 69 74 |estring;|....init|
|00005970| 6d 65 6e 75 73 20 28 29 | 3b 0d 09 0d 09 68 74 65 |menus ()|;....hte|
|00005980| 78 74 20 3d 20 67 65 74 | 52 65 73 6f 75 72 63 65 |xt = get|Resource|
|00005990| 41 6e 64 44 65 74 61 63 | 68 20 28 27 54 45 58 54 |AndDetac|h ('TEXT|
|000059a0| 27 2c 20 31 32 38 29 3b | 0d 09 0d 09 77 20 3d 20 |', 128);|....w = |
|000059b0| 47 65 74 4e 65 77 44 69 | 61 6c 6f 67 20 28 6d 6f |GetNewDi|alog (mo|
|000059c0| 64 65 6c 65 73 73 69 64 | 2c 20 6e 69 6c 2c 20 28 |delessid|, nil, (|
|000059d0| 57 69 6e 64 6f 77 50 74 | 72 29 20 2d 31 29 3b 0d |WindowPt|r) -1);.|
|000059e0| 09 0d 09 53 65 74 50 6f | 72 74 20 28 77 29 3b 0d |...SetPo|rt (w);.|
|000059f0| 09 0d 09 53 65 74 57 54 | 69 74 6c 65 20 28 77 2c |...SetWT|itle (w,|
|00005a00| 20 61 70 70 6e 61 6d 65 | 29 3b 0d 09 0d 09 63 6f | appname|);....co|
|00005a10| 70 79 73 74 72 69 6e 67 | 20 28 22 5c 70 54 68 65 |pystring| ("\pThe|
|00005a20| 20 d2 22 2c 20 74 69 74 | 6c 65 73 74 72 69 6e 67 | .", tit|lestring|
|00005a30| 29 3b 0d 09 0d 09 70 75 | 73 68 73 74 72 69 6e 67 |);....pu|shstring|
|00005a40| 20 28 61 70 70 6e 61 6d | 65 2c 20 74 69 74 6c 65 | (appnam|e, title|
|00005a50| 73 74 72 69 6e 67 29 3b | 0d 09 0d 09 70 75 73 68 |string);|....push|
|00005a60| 73 74 72 69 6e 67 20 28 | 22 5c 70 d3 20 44 72 6f |string (|"\p. Dro|
|00005a70| 70 6c 65 74 22 2c 20 74 | 69 74 6c 65 73 74 72 69 |plet", t|itlestri|
|00005a80| 6e 67 29 3b 0d 09 0d 09 | 77 68 69 6c 65 20 28 21 |ng);....|while (!|
|00005a90| 66 6c 65 78 69 74 6d 61 | 69 6e 6c 6f 6f 70 29 20 |flexitma|inloop) |
|00005aa0| 7b 0d 09 0d 09 09 53 65 | 74 43 75 72 73 6f 72 20 |{.....Se|tCursor |
|00005ab0| 28 26 61 72 72 6f 77 29 | 3b 0d 09 09 0d 09 09 69 |(&arrow)|;......i|
|00005ac0| 66 20 28 57 61 69 74 4e | 65 78 74 45 76 65 6e 74 |f (WaitN|extEvent|
|00005ad0| 20 28 65 76 65 72 79 45 | 76 65 6e 74 2c 20 26 65 | (everyE|vent, &e|
|00005ae0| 76 2c 20 33 30 2c 20 6e | 69 6c 29 29 20 7b 0d 09 |v, 30, n|il)) {..|
|00005af0| 09 09 0d 09 09 09 69 66 | 20 28 49 73 44 69 61 6c |......if| (IsDial|
|00005b00| 6f 67 45 76 65 6e 74 20 | 28 26 65 76 29 29 20 7b |ogEvent |(&ev)) {|
|00005b10| 0d 09 09 09 09 0d 09 09 | 09 09 73 77 69 74 63 68 |........|..switch|
|00005b20| 20 28 65 76 2e 77 68 61 | 74 29 20 7b 09 0d 09 09 | (ev.wha|t) {....|
|00005b30| 09 09 09 0d 09 09 09 09 | 09 63 61 73 65 20 75 70 |........|.case up|
|00005b40| 64 61 74 65 45 76 74 3a | 0d 09 09 09 09 09 09 53 |dateEvt:|.......S|
|00005b50| 65 74 50 6f 72 74 20 28 | 77 29 3b 0d 09 09 09 09 |etPort (|w);.....|
|00005b60| 09 09 0d 09 09 09 09 09 | 09 42 65 67 69 6e 55 70 |........|.BeginUp|
|00005b70| 64 61 74 65 20 28 77 29 | 3b 0d 09 09 09 09 09 09 |date (w)|;.......|
|00005b80| 0d 09 09 09 09 09 09 44 | 72 61 77 44 69 61 6c 6f |.......D|rawDialo|
|00005b90| 67 20 28 77 29 3b 0d 09 | 0d 09 09 09 09 09 09 69 |g (w);..|.......i|
|00005ba0| 66 20 28 66 6c 32 63 6c | 69 63 6b 29 20 09 09 09 |f (fl2cl|ick) ...|
|00005bb0| 09 09 0d 09 09 09 09 09 | 09 09 64 69 73 61 62 6c |........|..disabl|
|00005bc0| 65 64 69 61 6c 6f 67 69 | 74 65 6d 20 28 77 2c 20 |edialogi|tem (w, |
|00005bd0| 72 75 6e 69 74 65 6d 29 | 3b 0d 09 09 09 09 09 09 |runitem)|;.......|
|00005be0| 65 6c 73 65 0d 09 09 09 | 09 09 09 09 62 6f 6c 64 |else....|....bold|
|00005bf0| 65 6e 62 75 74 74 6f 6e | 20 28 77 2c 20 72 75 6e |enbutton| (w, run|
|00005c00| 69 74 65 6d 29 3b 0d 09 | 09 09 09 09 09 0d 09 09 |item);..|........|
|00005c10| 09 09 09 09 2f 2a 65 6e | 61 62 6c 65 20 45 64 69 |..../*en|able Edi|
|00005c20| 74 20 62 75 74 74 6f 6e | 20 69 66 20 69 74 27 73 |t button| if it's|
|00005c30| 20 6e 6f 74 20 52 75 6e | 74 69 6d 65 20 72 75 6e | not Run|time run|
|00005c40| 6e 69 6e 67 2a 2f 20 7b | 0d 09 09 09 09 09 09 0d |ning*/ {|........|
|00005c50| 09 09 09 09 09 09 09 73 | 68 6f 72 74 20 6d 61 6a |.......s|hort maj|
|00005c60| 6f 72 52 65 76 2c 20 6d | 69 6e 6f 72 52 65 76 2c |orRev, m|inorRev,|
|00005c70| 20 62 75 67 46 69 78 52 | 65 76 3b 0d 09 09 09 09 | bugFixR|ev;.....|
|00005c80| 09 09 09 42 6f 6f 6c 65 | 61 6e 20 66 6c 52 75 6e |...Boole|an flRun|
|00005c90| 74 69 6d 65 3b 0d 09 09 | 09 0d 09 09 09 09 09 09 |time;...|........|
|00005ca0| 09 67 65 74 46 72 6f 6e | 74 69 65 72 56 65 72 73 |.getFron|tierVers|
|00005cb0| 69 6f 6e 20 28 26 6d 61 | 6a 6f 72 52 65 76 2c 20 |ion (&ma|jorRev, |
|00005cc0| 26 6d 69 6e 6f 72 52 65 | 76 2c 20 26 62 75 67 46 |&minorRe|v, &bugF|
|00005cd0| 69 78 52 65 76 2c 20 26 | 66 6c 52 75 6e 74 69 6d |ixRev, &|flRuntim|
|00005ce0| 65 29 3b 0d 09 09 09 09 | 09 09 09 0d 09 09 09 09 |e);.....|........|
|00005cf0| 09 09 09 69 66 20 28 66 | 6c 52 75 6e 74 69 6d 65 |...if (f|lRuntime|
|00005d00| 29 0d 09 09 09 09 09 09 | 09 09 64 69 73 61 62 6c |).......|..disabl|
|00005d10| 65 64 69 61 6c 6f 67 69 | 74 65 6d 20 28 77 2c 20 |edialogi|tem (w, |
|00005d20| 65 64 69 74 69 74 65 6d | 29 3b 0d 09 09 09 09 09 |edititem|);......|
|00005d30| 09 09 7d 0d 09 09 09 09 | 09 09 0d 09 09 09 09 09 |..}.....|........|
|00005d40| 09 64 72 61 77 69 74 65 | 6d 69 63 6f 6e 20 28 77 |.drawite|micon (w|
|00005d50| 2c 20 69 63 6f 6e 69 74 | 65 6d 2c 20 31 32 38 29 |, iconit|em, 128)|
|00005d60| 3b 0d 09 09 09 09 09 09 | 0d 09 09 09 09 09 09 64 |;.......|.......d|
|00005d70| 72 61 77 69 74 65 6d 73 | 74 72 69 6e 67 20 28 77 |rawitems|tring (w|
|00005d80| 2c 20 74 69 74 6c 65 69 | 74 65 6d 2c 20 74 69 74 |, titlei|tem, tit|
|00005d90| 6c 65 73 74 72 69 6e 67 | 29 3b 0d 0d 09 09 09 09 |lestring|);......|
|00005da0| 09 09 64 72 61 77 69 74 | 65 6d 74 65 78 74 20 28 |..drawit|emtext (|
|00005db0| 77 2c 20 6d 73 67 69 74 | 65 6d 2c 20 68 74 65 78 |w, msgit|em, htex|
|00005dc0| 74 29 3b 0d 09 09 09 09 | 09 09 0d 09 09 09 09 09 |t);.....|........|
|00005dd0| 09 45 6e 64 55 70 64 61 | 74 65 20 28 77 29 3b 0d |.EndUpda|te (w);.|
|00005de0| 09 09 09 09 09 09 0d 09 | 09 09 09 09 09 62 72 65 |........|.....bre|
|00005df0| 61 6b 3b 0d 09 09 09 09 | 09 0d 09 09 09 09 09 63 |ak;.....|.......c|
|00005e00| 61 73 65 20 6b 65 79 44 | 6f 77 6e 3a 20 63 61 73 |ase keyD|own: cas|
|00005e10| 65 20 61 75 74 6f 4b 65 | 79 3a 20 7b 0d 09 09 09 |e autoKe|y: {....|
|00005e20| 09 09 09 69 66 20 28 21 | 68 61 6e 64 6c 65 6b 65 |...if (!|handleke|
|00005e30| 79 73 74 72 6f 6b 65 20 | 28 26 65 76 29 29 0d 09 |ystroke |(&ev))..|
|00005e40| 09 09 09 09 09 09 67 6f | 74 6f 20 65 6e 64 6c 6f |......go|to endlo|
|00005e50| 6f 70 3b 0d 09 09 09 09 | 09 09 0d 09 09 09 09 09 |op;.....|........|
|00005e60| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 09 09 7d 0d |.break;.|......}.|
|00005e70| 09 09 09 09 09 09 0d 09 | 09 09 09 09 64 65 66 61 |........|....defa|
|00005e80| 75 6c 74 3a 0d 09 09 09 | 09 09 09 69 66 20 28 44 |ult:....|...if (D|
|00005e90| 69 61 6c 6f 67 53 65 6c | 65 63 74 20 28 26 65 76 |ialogSel|ect (&ev|
|00005ea0| 2c 20 26 70 64 69 61 6c | 6f 67 2c 20 26 69 74 65 |, &pdial|og, &ite|
|00005eb0| 6d 68 69 74 29 29 20 7b | 0d 09 09 09 09 09 09 09 |mhit)) {|........|
|00005ec0| 0d 09 09 09 09 09 09 09 | 73 77 69 74 63 68 20 28 |........|switch (|
|00005ed0| 69 74 65 6d 68 69 74 29 | 20 7b 0d 09 09 09 09 09 |itemhit)| {......|
|00005ee0| 09 09 09 0d 09 09 09 09 | 09 09 09 09 63 61 73 65 |........|....case|
|00005ef0| 20 72 75 6e 69 74 65 6d | 3a 0d 09 09 09 09 09 09 | runitem|:.......|
|00005f00| 09 09 09 44 69 73 70 6f | 73 44 69 61 6c 6f 67 20 |...Dispo|sDialog |
|00005f10| 28 77 29 3b 0d 09 09 09 | 09 09 09 09 09 09 0d 09 |(w);....|........|
|00005f20| 09 09 09 09 09 09 09 09 | 77 20 3d 20 6e 69 6c 3b |........|w = nil;|
|00005f30| 0d 09 09 09 09 09 09 09 | 09 09 0d 09 09 09 09 09 |........|........|
|00005f40| 09 09 09 09 64 6f 66 69 | 6c 65 6c 69 73 74 20 28 |....dofi|lelist (|
|00005f50| 29 3b 0d 09 09 09 09 09 | 09 09 09 09 0d 09 09 09 |);......|........|
|00005f60| 09 09 09 09 09 09 67 6f | 74 6f 20 65 6e 64 6c 6f |......go|to endlo|
|00005f70| 6f 70 3b 0d 09 09 09 09 | 09 09 09 09 0d 09 09 09 |op;.....|........|
|00005f80| 09 09 09 09 09 63 61 73 | 65 20 63 61 6e 63 65 6c |.....cas|e cancel|
|00005f90| 69 74 65 6d 3a 0d 09 09 | 09 09 09 09 09 09 09 67 |item:...|.......g|
|00005fa0| 6f 74 6f 20 65 6e 64 6c | 6f 6f 70 3b 0d 09 09 09 |oto endl|oop;....|
|00005fb0| 09 09 09 09 09 09 0d 09 | 09 09 09 09 09 09 09 63 |........|.......c|
|00005fc0| 61 73 65 20 65 64 69 74 | 69 74 65 6d 3a 0d 09 09 |ase edit|item:...|
|00005fd0| 09 09 09 09 09 09 09 64 | 6f 65 64 69 74 20 28 29 |.......d|oedit ()|
|00005fe0| 3b 0d 09 09 09 09 09 09 | 09 09 09 0d 09 09 09 09 |;.......|........|
|00005ff0| 09 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 09 09 |.....bre|ak;.....|
|00006000| 09 09 09 09 7d 20 2f 2a | 73 77 69 74 63 68 2a 2f |....} /*|switch*/|
|00006010| 0d 09 09 09 09 09 09 09 | 7d 0d 09 09 09 09 09 7d |........|}......}|
|00006020| 20 2f 2a 73 77 69 74 63 | 68 2a 2f 0d 09 09 09 09 | /*switc|h*/.....|
|00006030| 7d 20 2f 2a 64 69 61 6c | 6f 67 20 65 76 65 6e 74 |} /*dial|og event|
|00006040| 2a 2f 0d 09 09 09 0d 09 | 09 09 65 6c 73 65 20 7b |*/......|..else {|
|00006050| 20 2f 2a 6e 6f 74 20 61 | 20 64 69 61 6c 6f 67 20 | /*not a| dialog |
|00006060| 65 76 65 6e 74 2a 2f 0d | 09 09 09 09 0d 09 09 09 |event*/.|........|
|00006070| 09 73 77 69 74 63 68 20 | 28 65 76 2e 77 68 61 74 |.switch |(ev.what|
|00006080| 29 20 7b 09 0d 0d 09 09 | 09 09 09 63 61 73 65 20 |) {.....|...case |
|00006090| 6d 6f 75 73 65 44 6f 77 | 6e 3a 0d 09 09 09 09 09 |mouseDow|n:......|
|000060a0| 09 68 61 6e 64 6c 65 6d | 6f 75 73 65 20 28 26 65 |.handlem|ouse (&e|
|000060b0| 76 29 3b 0d 09 09 09 09 | 09 09 0d 09 09 09 09 09 |v);.....|........|
|000060c0| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 09 0d 09 09 |.break;.|........|
|000060d0| 09 09 09 63 61 73 65 20 | 6b 48 69 67 68 4c 65 76 |...case |kHighLev|
|000060e0| 65 6c 45 76 65 6e 74 3a | 0d 09 09 09 09 09 09 41 |elEvent:|.......A|
|000060f0| 45 50 72 6f 63 65 73 73 | 41 70 70 6c 65 45 76 65 |EProcess|AppleEve|
|00006100| 6e 74 20 28 26 65 76 29 | 3b 0d 09 09 09 09 09 09 |nt (&ev)|;.......|
|00006110| 0d 09 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |.......b|reak;...|
|00006120| 09 09 09 7d 20 2f 2a 73 | 77 69 74 63 68 2a 2f 0d |...} /*s|witch*/.|
|00006130| 09 09 09 09 7d 0d 09 09 | 09 7d 20 2f 2a 57 4e 45 |....}...|.} /*WNE|
|00006140| 20 72 65 74 75 72 6e 65 | 64 20 74 72 75 65 2a 2f | returne|d true*/|
|00006150| 0d 09 09 65 6c 73 65 20 | 7b 09 09 09 0d 09 09 09 |...else |{.......|
|00006160| 69 66 20 28 21 66 6c 69 | 6e 73 74 61 6c 6c 65 64 |if (!fli|nstalled|
|00006170| 29 20 7b 0d 09 09 09 09 | 0d 09 09 09 09 66 6c 69 |) {.....|.....fli|
|00006180| 6e 73 74 61 6c 6c 65 64 | 20 3d 20 74 72 75 65 3b |nstalled| = true;|
|00006190| 0d 09 09 09 09 0d 09 09 | 09 09 64 6f 69 6e 73 74 |........|..doinst|
|000061a0| 61 6c 6c 20 28 29 3b 0d | 09 09 09 09 7d 0d 0d 09 |all ();.|....}...|
|000061b0| 09 09 43 68 65 63 6b 53 | 68 61 72 65 64 4d 65 6e |..CheckS|haredMen|
|000061c0| 75 73 20 28 31 34 30 29 | 3b 0d 09 09 09 7d 0d 09 |us (140)|;....}..|
|000061d0| 09 7d 20 2f 2a 77 68 69 | 6c 65 2a 2f 0d 0d 09 65 |.} /*whi|le*/...e|
|000061e0| 6e 64 6c 6f 6f 70 3a 0d | 09 0d 09 69 66 20 28 77 |ndloop:.|...if (w|
|000061f0| 20 21 3d 20 6e 69 6c 29 | 0d 09 09 44 69 73 70 6f | != nil)|...Dispo|
|00006200| 73 44 69 61 6c 6f 67 20 | 28 77 29 3b 0d 09 7d 20 |sDialog |(w);..} |
|00006210| 2f 2a 6d 61 69 6e 65 76 | 65 6e 74 6c 6f 6f 70 2a |/*mainev|entloop*|
|00006220| 2f 0d 09 0d 09 0d 76 6f | 69 64 20 6d 61 69 6e 20 |/.....vo|id main |
|00006230| 28 76 6f 69 64 29 20 7b | 0d 09 0d 09 6c 6f 6e 67 |(void) {|....long|
|00006240| 20 65 78 70 69 72 65 73 | 61 74 3b 0d 09 0d 09 49 | expires|at;....I|
|00006250| 6e 69 74 47 72 61 66 20 | 28 26 71 64 2e 74 68 65 |nitGraf |(&qd.the|
|00006260| 50 6f 72 74 29 3b 0d 09 | 0d 09 49 6e 69 74 46 6f |Port);..|..InitFo|
|00006270| 6e 74 73 20 28 29 3b 0d | 09 0d 09 46 6c 75 73 68 |nts ();.|...Flush|
|00006280| 45 76 65 6e 74 73 20 28 | 65 76 65 72 79 45 76 65 |Events (|everyEve|
|00006290| 6e 74 2c 20 30 29 3b 0d | 09 0d 09 49 6e 69 74 57 |nt, 0);.|...InitW|
|000062a0| 69 6e 64 6f 77 73 20 28 | 29 3b 0d 09 0d 09 49 6e |indows (|);....In|
|000062b0| 69 74 4d 65 6e 75 73 20 | 28 29 3b 0d 09 0d 09 54 |itMenus |();....T|
|000062c0| 45 49 6e 69 74 20 28 29 | 3b 0d 09 0d 09 49 6e 69 |EInit ()|;....Ini|
|000062d0| 74 44 69 61 6c 6f 67 73 | 20 28 6e 69 6c 29 3b 0d |tDialogs| (nil);.|
|000062e0| 09 0d 09 49 6e 69 74 43 | 75 72 73 6f 72 20 28 29 |...InitC|ursor ()|
|000062f0| 3b 0d 09 0d 09 69 66 20 | 28 21 49 41 43 68 61 76 |;....if |(!IAChav|
|00006300| 65 61 70 70 6c 65 65 76 | 65 6e 74 73 20 28 29 29 |eappleev|ents ())|
|00006310| 20 0d 09 09 72 65 74 75 | 72 6e 3b 0d 09 09 0d 09 | ...retu|rn;.....|
|00006320| 49 6e 69 74 53 68 61 72 | 65 64 4d 65 6e 75 73 20 |InitShar|edMenus |
|00006330| 28 29 3b 0d 09 09 0d 09 | 69 66 20 28 21 49 41 43 |();.....|if (!IAC|
|00006340| 69 6e 73 74 61 6c 6c 68 | 61 6e 64 6c 65 72 20 28 |installh|andler (|
|00006350| 6b 43 6f 72 65 45 76 65 | 6e 74 43 6c 61 73 73 2c |kCoreEve|ntClass,|
|00006360| 20 6b 41 45 4f 70 65 6e | 41 70 70 6c 69 63 61 74 | kAEOpen|Applicat|
|00006370| 69 6f 6e 2c 20 28 50 72 | 6f 63 50 74 72 29 20 26 |ion, (Pr|ocPtr) &|
|00006380| 68 61 6e 64 6c 65 6f 70 | 65 6e 61 70 70 29 29 0d |handleop|enapp)).|
|00006390| 09 09 72 65 74 75 72 6e | 3b 0d 09 09 0d 09 69 66 |..return|;.....if|
|000063a0| 20 28 21 49 41 43 69 6e | 73 74 61 6c 6c 68 61 6e | (!IACin|stallhan|
|000063b0| 64 6c 65 72 20 28 6b 43 | 6f 72 65 45 76 65 6e 74 |dler (kC|oreEvent|
|000063c0| 43 6c 61 73 73 2c 20 6b | 41 45 4f 70 65 6e 44 6f |Class, k|AEOpenDo|
|000063d0| 63 75 6d 65 6e 74 73 2c | 20 28 50 72 6f 63 50 74 |cuments,| (ProcPt|
|000063e0| 72 29 20 26 68 61 6e 64 | 6c 65 6f 70 65 6e 29 29 |r) &hand|leopen))|
|000063f0| 0d 09 09 72 65 74 75 72 | 6e 3b 0d 09 09 0d 09 47 |...retur|n;.....G|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.